

---@param musicFileName string
---@param frommsecs integer
---@return nothing
cj.PlayThematicMusicEx = function(musicFileName, frommsecs)end

---${实数}的平方根
---平方根

---@param x real
---@return real
cj.SquareRoot = function(x)end


---@param i integer
---@return unitevent
cj.ConvertUnitEvent = function(i)end

---转换弧度${Radians}为角度
---转换弧度为角度

---@param radians real
---@return real
cj.Rad2Deg = function(radians)end

---被改变所有者的单位
---被改变所有者的单位
---响应'改变所有者'单位事件.

---@param undefined nothing
---@return unit
cj.GetChangingUnit = function(undefined)end

---转换角度${Degrees}为弧度
---转换角度为弧度

---@param degrees real
---@return real
cj.Deg2Rad = function(degrees)end


---@param i integer
---@return playerunitevent
cj.ConvertPlayerUnitEvent = function(i)end

---${单位}的当前转身速度
---当前转身速度
---转身速度表示单位改变面向方向时的速度.数值越小表示转身越慢.

---@param whichUnit unit
---@return real
cj.GetUnitTurnSpeed = function(whichUnit)end

---Sin(${Angle})
---正弦(弧度)[R]
---采用弧度制计算.

---@param radians real
---@return real
cj.Sin = function(radians)end

---Cos(${Angle})
---余弦(弧度)[R]
---采用弧度制计算.

---@param radians real
---@return real
cj.Cos = function(radians)end


---@param x real
---@param y real
---@param zOffsetDest real
---@return nothing
cj.PanCameraToWithZ = function(x, y, zOffsetDest)end

---Tan(${Angle})
---正切(弧度)[R]
---采用弧度制计算.

---@param radians real
---@return real
cj.Tan = function(radians)end

---踢除${Player}，玩家的游戏结果为${文字}
---踢除玩家

---@param whichPlayer player
---@param gameResult playergameresult
---@return nothing
cj.RemovePlayer = function(whichPlayer, gameResult)end

---${Quest}是主要任务
---是主要任务

---@param whichQuest quest
---@return boolean
cj.IsQuestRequired = function(whichQuest)end

---玩家开启作弊模式:无法失败
---无法失败[R]
---单机作弊码开启的模式.

---@param undefined nothing
---@return boolean
cj.IsNoDefeatCheat = function(undefined)end


---@param i integer
---@return racepreference
cj.ConvertRacePref = function(i)end

---死亡单位
---死亡单位
---响应'死亡'单位事件.

---@param undefined nothing
---@return unit
cj.GetDyingUnit = function(undefined)end


---@param i integer
---@return playergameresult
cj.ConvertPlayerGameResult = function(i)end

---缓存:${GameCache}类别名:${Category}使用名称:${文字}记录:${布尔值}
---记录布尔值
---使用'游戏缓存-读取布尔值'来读取该值.名称和类别名不能包含空格.

---@param cache gamecache
---@param missionKey string
---@param key string
---@param value boolean
---@return nothing
cj.StoreBoolean = function(cache, missionKey, key, value)end

---删除${VisibilityModifier}
---删除可见度修正器

---@param whichFogModifier fogmodifier
---@return nothing
cj.DestroyFogModifier = function(whichFogModifier)end

---${单位类型}使用的人口数量
---单位使用人口数量(指定单位类型)

---@param unitId integer
---@return integer
cj.GetFoodUsed = function(unitId)end

---${Player}的控制者
---玩家控制者

---@param whichPlayer player
---@return mapcontrol
cj.GetPlayerController = function(whichPlayer)end

---转换${String}为实数
---转换字符串为实数

---@param s string
---@return real
cj.S2R = function(s)end


---@param whichSetup camerasetup
---@return real
cj.CameraSetupGetDestPositionX = function(whichSetup)end

---设置${英雄}的力量为${Value},(${Permanent}永久奖励)
---设置英雄力量[R]
---永久奖励貌似无效项,不需要理会.

---@param whichHero unit
---@param newStr integer
---@param permanent boolean
---@return nothing
cj.SetHeroStr = function(whichHero, newStr, permanent)end


---@param doScoreScreen boolean
---@return nothing
cj.RestartGame = function(doScoreScreen)end

---坐标(${X},${Y})
---坐标点
---会创建点.

---@param x real
---@param y real
---@return location
cj.Location = function(x, y)end

---Asin(${数值})
---反正弦(弧度)[R]
---采用弧度制计算.返回弧度取值-π/2—π/2.

---@param y real
---@return real
cj.Asin = function(y)end

---${单位}与${单位}相同
---单位检查
---用来判断两个单位是否相等。

---@param whichUnit unit
---@param whichSpecifiedUnit unit
---@return boolean
cj.IsUnit = function(whichUnit, whichSpecifiedUnit)end


---@param b boolean
---@return nothing
cj.SuspendTimeOfDay = function(b)end


---@param x real
---@param y real
---@return nothing
cj.SetCameraPosition = function(x, y)end


---@param whichUnit unit
---@return boolean
cj.IsUnitHidden = function(whichUnit)end

---Atan(${Y}:${X})
---反正切(Y:X)(弧度)[R]
---采用弧度制计算.返回弧度取值-π/2—π/2.

---@param y real
---@param x real
---@return real
cj.Atan2 = function(y, x)end


---@param minu real
---@param minv real
---@param maxu real
---@param maxv real
---@return nothing
cj.SetCineFilterStartUV = function(minu, minv, maxu, maxv)end

---从${单位池}中删除${单位}
---删除单位类型[R]

---@param whichPool unitpool
---@param unitId integer
---@return nothing
cj.UnitPoolRemoveUnitType = function(whichPool, unitId)end


---@param undefined nothing
---@return ability
cj.GetSpellAbility = function(undefined)end


---@param i integer
---@return gamedifficulty
cj.ConvertGameDifficulty = function(i)end


---@param r race
---@return nothing
cj.SetCampaignMenuRace = function(r)end

---对${单位组}发布${Order}命令,目标:${单位}
---发布命令(指定单位)(ID)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order integer
---@param targetWidget widget
---@return boolean
cj.GroupTargetOrderById = function(whichGroup, order, targetWidget)end

---Atan(${数值})
---反正切(弧度)[R]
---采用弧度制计算.返回弧度取值-π/2—π/2.

---@param x real
---@return real
cj.Atan = function(x)end


---@param whichStartLoc integer
---@param prioSlotIndex integer
---@return startlocprio
cj.GetStartLocPrio = function(whichStartLoc, prioSlotIndex)end

---设置${Multiboard}的列数为${Columns}
---设置列数

---@param lb multiboard
---@param count integer
---@return nothing
cj.MultiboardSetColumnCount = function(lb, count)end


---@param i integer
---@return itemtype
cj.ConvertItemType = function(i)end

---被取消的建筑
---被取消的建筑
---响应'取消建造建筑'单位事件.

---@param undefined nothing
---@return unit
cj.GetCancelledStructure = function(undefined)end

---Acos(${数值})
---反余弦(弧度)[R]
---采用弧度制计算.返回弧度取值0—π.

---@param x real
---@return real
cj.Acos = function(x)end


---@param whichTrigger trigger
---@param flag boolean
---@return nothing
cj.TriggerWaitOnSleeps = function(whichTrigger, flag)end

---${单位}的集结点目标
---单位集结点目标
---如果指定单位没有设置集结点到可破坏物上,则返回null.

---@param whichUnit unit
---@return destructable
cj.GetUnitRallyDestructable = function(whichUnit)end

---新建${玩家}的${单位}的尸体在(${X},${Y}),面向角度:${Face}度
---新建尸体[R]

---@param whichPlayer player
---@param unitid integer
---@param x real
---@param y real
---@param face real
---@return unit
cj.CreateCorpse = function(whichPlayer, unitid, x, y, face)end


---@param sourceDirName string
---@param destDirName string
---@return boolean
cj.RenameSaveDirectory = function(sourceDirName, destDirName)end

---${实数}的${实数}次幂
---幂运算

---@param x real
---@param power real
---@return real
cj.Pow = function(x, power)end

---改变${Image}类型为${Type}
---改变图像类型

---@param whichImage image
---@param imageType integer
---@return nothing
cj.SetImageType = function(whichImage, imageType)end


---@param lb leaderboard
---@param label string
---@param value integer
---@param p player
---@return nothing
cj.LeaderboardAddItem = function(lb, label, value, p)end

---设置${VolumeChannel}的音量为${Volume}
---设置多通道音量[R]
---音量取值范围0-1.

---@param vgroup volumegroup
---@param scale real
---@return nothing
cj.VolumeGroupSetVolume = function(vgroup, scale)end


---@param i integer
---@return startlocprio
cj.ConvertStartLocPrio = function(i)end

---设置${Quest}${Enable/Disable}
---启用/禁用任务[R]
---被禁用的任务将不会显示在任务列表.

---@param whichQuest quest
---@param enabled boolean
---@return nothing
cj.QuestSetEnabled = function(whichQuest, enabled)end

---转换${Integer}为实数
---转换整数为实数

---@param i integer
---@return real
cj.I2R = function(i)end


---@param whichPlayer player
---@param techid integer
---@param maximum integer
---@return nothing
cj.SetPlayerTechMaxAllowed = function(whichPlayer, techid, maximum)end


---@param operandA boolexpr
---@param operandB boolexpr
---@return boolexpr
cj.Or = function(operandA, operandB)end


---@param i integer
---@return version
cj.ConvertVersion = function(i)end


---@param campaignNumber integer
---@param available boolean
---@return nothing
cj.SetOpCinematicAvailable = function(campaignNumber, available)end

---转换${字符串}为${Lower/UpperCase}形式
---大小写转换

---@param source string
---@param upper boolean
---@return string
cj.StringCase = function(source, upper)end

---恢复${单位}的警戒点
---恢复指定单位的警戒点
---这个动作通过AI来恢复特定单位的警戒点.

---@param hUnit unit
---@return nothing
cj.RecycleGuardPosition = function(hUnit)end


---@param i integer
---@return raritycontrol
cj.ConvertRarityControl = function(i)end

---坐标(${x},${y})在${玩家}的黑色阴影内
---坐标在黑色阴影中

---@param x real
---@param y real
---@param whichPlayer player
---@return boolean
cj.IsMaskedToPlayer = function(x, y, whichPlayer)end

---随机实数,最小值:${Minimum}最大值:${Maximum}
---随机实数

---@param lowBound real
---@param highBound real
---@return real
cj.GetRandomReal = function(lowBound, highBound)end

---${启用/禁用}黑色阴影
---启用/禁用黑色阴影[R]

---@param enable boolean
---@return nothing
cj.FogMaskEnable = function(enable)end

---转换${Real}为整数
---转换实数为整数
---舍弃小数部分.

---@param r real
---@return integer
cj.R2I = function(r)end

---转换${Integer}为字符串
---转换整数为字符串

---@param i integer
---@return string
cj.I2S = function(i)end

---转换${Real}为字符串
---转换实数为字符串

---@param r real
---@return string
cj.R2S = function(r)end


---@param whichPlayer player
---@return boolean
cj.GetPlayerSelectable = function(whichPlayer)end


---@param i item
---@param flag boolean
---@return nothing
cj.SetItemDroppable = function(i, flag)end

---${单位}在${单位组}中
---在单位组

---@param whichUnit unit
---@param whichGroup group
---@return boolean
cj.IsUnitInGroup = function(whichUnit, whichGroup)end


---@param i integer
---@return placement
cj.ConvertPlacement = function(i)end

---转换${Real}为字符串,最小宽度:${Width},小数位数:${Precision}
---格式转换实数为字符串
---如:转换(1.234,7,2)后为''1.23''.转换(1.234,2,5)后为''1.23400''.

---@param r real
---@param width integer
---@param precision integer
---@return string
cj.R2SW = function(r, width, precision)end

---对${单位组}发布${Order}
---发布命令(无目标)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order string
---@return boolean
cj.GroupImmediateOrder = function(whichGroup, order)end

---转换${String}为整数
---转换字符串为整数

---@param s string
---@return integer
cj.S2I = function(s)end

---恢复${计时器}
---恢复计时器[R]

---@param whichTimer timer
---@return nothing
cj.ResumeTimer = function(whichTimer)end

---${点}的Y轴坐标
---点的Y轴坐标

---@param whichLocation location
---@return real
cj.GetLocationY = function(whichLocation)end

---转换${Handle}为整数
---<1.24>获取对象的h2i值[C]
---创建一个对应该handle的临时密钥,可以在哈希表中作为索引号使用.当该handle被彻底销毁时,密钥会被回收.

---@param h handle
---@return integer
cj.GetHandleId = function(h)end


---@param d destructable
---@param whichAnimation string
---@return nothing
cj.QueueDestructableAnimation = function(d, whichAnimation)end

---对${单位组}发布${Order}命令,目标:${指定点}
---发布命令(指定点)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order string
---@param whichLocation location
---@return boolean
cj.GroupPointOrderLoc = function(whichGroup, order, whichLocation)end


---@param doScoreScreen boolean
---@return nothing
cj.EndGame = function(doScoreScreen)end

---截取${字符串}的${Start}-${End}字节部分(不包括首字节)
---截取字符串[R]
---例:截取''Gruntsstink''的2-4字节部分=''un''.

---@param source string
---@param start integer
---@param end integer
---@return string
cj.SubString = function(source, start, end)end

---(${String})的哈希值
---获取字符串的哈希值
---获取一个对应该字符串的密钥，不同的字符串的密钥基本不可能相同，也很难找到两个不同的字符串他们有着相同的密钥。可以用于制作密码等功能。

---@param s string
---@return integer
cj.StringHash = function(s)end

---为${单位组}添加以(${坐标X},${坐标Y})为圆心，${半径}为半径的圆范围内，满足${条件}的单位
---选取单位添加到单位组(坐标)

---@param whichGroup group
---@param x real
---@param y real
---@param radius real
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsInRange = function(whichGroup, x, y, radius, filter)end


---@param whichButton integer
---@param visible boolean
---@return nothing
cj.SetCustomCampaignButtonVisible = function(whichButton, visible)end

---删除${玩家组}
---删除玩家组[R]
---注意:不要删除系统预置的玩家组.

---@param whichForce force
---@return nothing
cj.DestroyForce = function(whichForce)end

---${String}的长度
---字符串长度

---@param s string
---@return integer
cj.StringLength = function(s)end

---${物品}可被抵押
---物品可被抵押[R]

---@param whichItem item
---@return boolean
cj.IsItemPawnable = function(whichItem)end

---设置${可破坏物}的闭塞高度为${Height}
---设置闭塞高度

---@param d destructable
---@param height real
---@return nothing
cj.SetDestructableOccluderHeight = function(d, height)end


---@param i integer
---@return fogstate
cj.ConvertFogState = function(i)end


---@param i integer
---@return playerscore
cj.ConvertPlayerScore = function(i)end


---@param whichTrigger trigger
---@param  player
---@param whichPlayerEvent playerevent
---@return event
cj.TriggerRegisterPlayerEvent = function(whichTrigger, , whichPlayerEvent)end


---@param i integer
---@return race
cj.ConvertRace = function(i)end

---本地字符串:${文字}
---本地字符串[R]
---获取ui\\framedef\\globalstrings.fdf中定义的字符串.

---@param source string
---@return string
cj.GetLocalizedString = function(source)end


---@param undefined nothing
---@return nothing
cj.PreloadEndEx = function(undefined)end


---@param i integer
---@return mapvisibility
cj.ConvertMapVisibility = function(i)end

---${不规则区域}内包含坐标(${X},${Y})
---包含坐标
---TC_REGION

---@param whichRegion region
---@param x real
---@param y real
---@return boolean
cj.IsPointInRegion = function(whichRegion, x, y)end

---本地热键:${文字}
---本地热键
---获取ui\\miscui.txt中定义的热键.

---@param source string
---@return integer
cj.GetLocalizedHotkey = function(source)end


---@param t texttag
---@param flag boolean
---@return nothing
cj.SetTextTagSuspended = function(t, flag)end


---@param i integer
---@return alliancetype
cj.ConvertAllianceType = function(i)end

---${对话框按钮}被点击
---对话框按钮被点击[R]
---指定对话框按钮被点击,该事件一般需要在其他触发为其添加.

---@param whichTrigger trigger
---@param whichButton button
---@return event
cj.TriggerRegisterDialogButtonEvent = function(whichTrigger, whichButton)end


---@param i integer
---@return igamestate
cj.ConvertIGameState = function(i)end

---${存档文件}已存在
---游戏存档存在

---@param saveName string
---@return boolean
cj.SaveGameExists = function(saveName)end


---@param t texttag
---@param flag boolean
---@return nothing
cj.SetTextTagPermanent = function(t, flag)end

---重新设置${矩形区域},左下角点为${点}右上角点为${点}
---设置矩形区域(指定点)[R]
---该区域必须是一个变量.重新设置矩形区域的大小和位置.

---@param whichRect rect
---@param min location
---@param max location
---@return nothing
cj.SetRectFromLoc = function(whichRect, min, max)end


---@param i integer
---@return fgamestate
cj.ConvertFGameState = function(i)end


---@param abilityString string
---@param t effecttype
---@param index integer
---@return string
cj.GetAbilityEffect = function(abilityString, t, index)end


---@param i integer
---@return playerstate
cj.ConvertPlayerState = function(i)end

---限制所有市场的可出售物品种类数为${Quantity}
---限制物品种类(所有市场)
---影响所有拥有'出售物品'技能的单位.

---@param slots integer
---@return nothing
cj.SetAllItemTypeSlots = function(slots)end


---@param i integer
---@return unitstate
cj.ConvertUnitState = function(i)end

---${可破坏物}的最大生命值
---最大生命值

---@param d destructable
---@return real
cj.GetDestructableMaxLife = function(d)end


---@param i integer
---@return aidifficulty
cj.ConvertAIDifficulty = function(i)end

---设置${可破坏物}的生命值为${Value}
---设置生命值(指定值)

---@param d destructable
---@param life real
---@return nothing
cj.SetDestructableLife = function(d, life)end


---@param i integer
---@return gameevent
cj.ConvertGameEvent = function(i)end

---${单位}在距离坐标(${X},${Y})${范围}范围内
---在指定坐标范围内[R]

---@param whichUnit unit
---@param x real
---@param y real
---@param distance real
---@return boolean
cj.IsUnitInRangeXY = function(whichUnit, x, y, distance)end

---${单位}的${Property}
---属性[R]

---@param whichUnit unit
---@param whichUnitState unitstate
---@return real
cj.GetUnitState = function(whichUnit, whichUnitState)end


---@param i integer
---@return playerevent
cj.ConvertPlayerEvent = function(i)end

---播放${单位}的第${序号}号动作
---播放单位指定序号动动作[R]
---可以指定播放所有的单位动画,不过需要自己多尝试.每个单位的动作序号不一样的.

---@param whichUnit unit
---@param whichAnimation integer
---@return nothing
cj.SetUnitAnimationByIndex = function(whichUnit, whichAnimation)end


---@param soundHandle sound
---@return boolean
cj.GetSoundIsPlaying = function(soundHandle)end


---@param i integer
---@return attacktype
cj.ConvertAttackType = function(i)end


---@param i integer
---@return widgetevent
cj.ConvertWidgetEvent = function(i)end


---@param i integer
---@return playercolor
cj.ConvertPlayerColor = function(i)end

---设置小地图特殊标志为${Image}
---设置小地图特殊标志
---必须使用16x16的图像.

---@param iconPath string
---@return nothing
cj.SetAltMinimapIcon = function(iconPath)end


---@param i integer
---@return mapflag
cj.ConvertMapFlag = function(i)end

---设定${Player}${暂停/恢复}当前AI脚本的运行
---暂停/恢复AI脚本运行[R]
---事实上该函数是有问题的,可以这么理解:设玩家当前AI脚本的运行状态R为0,暂停1次则R+1,恢复1次则R-1,仅当R=0时该玩家才会运行AI.在使用前请先理解这段话的意思.

---@param p player
---@param pause boolean
---@return nothing
cj.PauseCompAI = function(p, pause)end


---@param i integer
---@return dialogevent
cj.ConvertDialogEvent = function(i)end


---@param i integer
---@return limitop
cj.ConvertLimitOp = function(i)end


---@param whichEffect effect
---@return nothing
cj.DestroyEffect = function(whichEffect)end

---${单位}的当前转向角度(弧度制)
---当前转向角度(弧度制)[R]
---单位转身时的转向角度.数值越大转向幅度越大.

---@param whichUnit unit
---@return real
cj.GetUnitPropWindow = function(whichUnit)end


---@param d destructable
---@return real
cj.GetDestructableY = function(d)end

---停止所有地形变化
---停止所有地形变化
---包括由技能引起的地形变化.

---@param undefined nothing
---@return nothing
cj.TerrainDeformStopAll = function(undefined)end


---@param i integer
---@return unittype
cj.ConvertUnitType = function(i)end


---@param whichQuest quest
---@return questitem
cj.QuestCreateItem = function(whichQuest)end


---@param i integer
---@return volumegroup
cj.ConvertVolumeGroup = function(i)end

---命令${单位}使用${物品}
---使用物品(无目标)

---@param whichUnit unit
---@param whichItem item
---@return boolean
cj.UnitUseItem = function(whichUnit, whichItem)end

---设置${Multiboard}的行数为${Rows}
---设置行数

---@param lb multiboard
---@param count integer
---@return nothing
cj.MultiboardSetRowCount = function(lb, count)end

---改变${单位}的尺寸缩放为:(${X},${Y},${Z})
---改变单位尺寸(按倍数)[R]
---缩放尺寸使用(长,宽,高)格式.

---@param whichUnit unit
---@param scaleX real
---@param scaleY real
---@param scaleZ real
---@return nothing
cj.SetUnitScale = function(whichUnit, scaleX, scaleY, scaleZ)end


---@param i integer
---@return gamespeed
cj.ConvertGameSpeed = function(i)end

---${Hero}不可获得经验
---经验不可获得
---可使用'英雄-允许/禁止经验获取'来设置该项.

---@param whichHero unit
---@return boolean
cj.IsSuspendedXP = function(whichHero)end

---使${玩家}对${单位}发布${Order}命令到目标:${单位}
---发布中介命令(指定单位)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@param target widget
---@return boolean
cj.IssueNeutralTargetOrder = function(forWhichPlayer, neutralStructure, unitToBuild, target)end

---播放${单位}的${AnimationName}动作,只用${Rarity}动作
---播放单位动运作(指定概率)
---通过'重置单位动作'恢复到普通的动作.

---@param whichUnit unit
---@param whichAnimation string
---@param rarity raritycontrol
---@return nothing
cj.SetUnitAnimationWithRarity = function(whichUnit, whichAnimation, rarity)end


---@param i integer
---@return mapsetting
cj.ConvertMapSetting = function(i)end

---${启用/禁用}玩家控制权
---启用/禁用玩家控制权(所有玩家)[R]

---@param b boolean
---@return nothing
cj.EnableUserControl = function(b)end


---@param toPlayer player
---@param x real
---@param y real
---@param duration real
---@param message string
---@return nothing
cj.DisplayTimedTextFromPlayer = function(toPlayer, x, y, duration, message)end


---@param i integer
---@return gametype
cj.ConvertGameType = function(i)end

---新建的计时器
---新建计时器[R]
---会创建计时器.

---@param undefined nothing
---@return timer
cj.CreateTimer = function(undefined)end


---@param i integer
---@return mapdensity
cj.ConvertMapDensity = function(i)end

---新建的${可破坏物类型}在(${X},${Y},${Z}),面向角度:${Direction}尺寸缩放:${Scale}样式:${Variation}
---新建可破坏物[R]
---坐标为(X,Y,Z)格式.面向角度采用角度制,0度为正东方向,90度为正北方向.

---@param objectid integer
---@param x real
---@param y real
---@param z real
---@param face real
---@param scale real
---@param variation integer
---@return destructable
cj.CreateDestructableZ = function(objectid, x, y, z, face, scale, variation)end

---${QuestRequirement}已完成
---任务项目完成

---@param whichQuestItem questitem
---@return boolean
cj.IsQuestItemCompleted = function(whichQuestItem)end


---@param i integer
---@return mapcontrol
cj.ConvertMapControl = function(i)end


---@param forWhichPlayer player
---@param whichState fogstate
---@param center location
---@param radius real
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
cj.CreateFogModifierRadiusLoc = function(forWhichPlayer, whichState, center, radius, useSharedVision, afterUnits)end


---@param lb multiboard
---@param width real
---@return nothing
cj.MultiboardSetItemsWidth = function(lb, width)end


---@param i integer
---@return playerslotstate
cj.ConvertPlayerSlotState = function(i)end


---@param lb leaderboard
---@param showLabel boolean
---@param showNames boolean
---@param showValues boolean
---@param showIcons boolean
---@return nothing
cj.LeaderboardSetStyle = function(lb, showLabel, showNames, showValues, showIcons)end


---@param whichUnit unit
---@param newTurnSpeed real
---@return nothing
cj.SetUnitTurnSpeed = function(whichUnit, newTurnSpeed)end


---@param i integer
---@return camerafield
cj.ConvertCameraField = function(i)end

---设置${多面板项目}的项目颜色为(${Red},${Green},${Blue}),Alpha值为${Transparency}
---设置指定项目颜色[R]
---颜色格式为(红,绿,蓝).Alpha值为0是不可见的.颜色值和Alpha值取值范围为0-255.

---@param mbi multiboarditem
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.MultiboardSetItemValueColor = function(mbi, red, green, blue, alpha)end

---设置${单位}${是否}${技能}永久性
---设置技能永久性[R]
---如触发添加给单位的技能就是非永久性的,非永久性技能在变身并回复之后会丢失掉.这类情况就需要设置技能永久性.

---@param whichUnit unit
---@param permanent boolean
---@param abilityId integer
---@return boolean
cj.UnitMakeAbilityPermanent = function(whichUnit, permanent, abilityId)end

---从${单位池}中为${玩家}任意选择一个单位并放置到点(${X},${Y})面向${度}
---选择放置单位[R]

---@param whichPool unitpool
---@param forWhichPlayer player
---@param x real
---@param y real
---@param facing real
---@return unit
cj.PlaceRandomUnit = function(whichPool, forWhichPlayer, x, y, facing)end


---@param i integer
---@return blendmode
cj.ConvertBlendMode = function(i)end

---对${单位}发布${Order}命令到目标点:${指定点}
---发布命令(指定点)(ID)

---@param whichUnit unit
---@param order integer
---@param whichLocation location
---@return boolean
cj.IssuePointOrderByIdLoc = function(whichUnit, order, whichLocation)end


---@param i integer
---@return texmapflags
cj.ConvertTexMapFlags = function(i)end

---从${物品池}中任意选择一个物品并放置到(${X},${Y})点
---选择放置物品[R]

---@param whichItemPool itempool
---@param x real
---@param y real
---@return item
cj.PlaceRandomItem = function(whichItemPool, x, y)end


---@param orderId integer
---@return string
cj.OrderId2String = function(orderId)end


---@param i integer
---@return effecttype
cj.ConvertEffectType = function(i)end


---@param whichGroup group
---@param r rect
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsInRect = function(whichGroup, r, filter)end


---@param i integer
---@return damagetype
cj.ConvertDamageType = function(i)end

---设置${物品}产生${单位类型}
---设置重生神符的产生单位类型
---设置重生神符对应的单位类型后，当英雄吃了重生神符，则会产生指定类型的单位。

---@param whichItem item
---@param unitId integer
---@return nothing
cj.SetItemDropID = function(whichItem, unitId)end


---@param undefined nothing
---@return button
cj.GetClickedButton = function(undefined)end


---@param whichUnit unit
---@param order string
---@param targetWidget widget
---@param instantTargetWidget widget
---@return boolean
cj.IssueInstantTargetOrder = function(whichUnit, order, targetWidget, instantTargetWidget)end


---@param whichUnit unit
---@param order integer
---@param targetWidget widget
---@param instantTargetWidget widget
---@return boolean
cj.IssueInstantTargetOrderById = function(whichUnit, order, targetWidget, instantTargetWidget)end


---@param i integer
---@return weapontype
cj.ConvertWeaponType = function(i)end


---@param whichBolt lightning
---@return real
cj.GetLightningColorG = function(whichBolt)end


---@param t texttag
---@param age real
---@return nothing
cj.SetTextTagAge = function(t, age)end


---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.SelectUnit = function(whichUnit, flag)end


---@param i integer
---@return soundtype
cj.ConvertSoundType = function(i)end

---设置${物品}的自定义值为${Index}
---设置物品自定义值
---物品自定义值只用于触发器.可以用来为物品绑定一个整型数据.

---@param whichItem item
---@param data integer
---@return nothing
cj.SetItemUserData = function(whichItem, data)end

---杀死${可破坏物}
---杀死

---@param d destructable
---@return nothing
cj.KillDestructable = function(d)end


---@param whichTrigger trigger
---@return boolean
cj.IsTriggerWaitOnSleeps = function(whichTrigger)end

---${单位}在距离${指定单位}${范围}范围内
---在指定单位范围内[R]

---@param whichUnit unit
---@param otherUnit unit
---@param distance real
---@return boolean
cj.IsUnitInRange = function(whichUnit, otherUnit, distance)end


---@param i integer
---@return pathingtype
cj.ConvertPathingType = function(i)end


---@param undefined nothing
---@return gamestate
cj.GetEventGameState = function(undefined)end

---设置${Multiboard}${Show/Hide}
---显示/隐藏[R]
---多面板不能在地图初始化时显示.

---@param lb multiboard
---@param show boolean
---@return nothing
cj.MultiboardDisplay = function(lb, show)end


---@param undefined nothing
---@return unitstate
cj.GetEventUnitState = function(undefined)end


---@param name string
---@return nothing
cj.SetMapName = function(name)end


---@param description string
---@return nothing
cj.SetMapDescription = function(description)end

---${Player}的种族
---玩家的种族

---@param whichPlayer player
---@return race
cj.GetPlayerRace = function(whichPlayer)end


---@param teamcount integer
---@return nothing
cj.SetTeams = function(teamcount)end

---设置${传送门}的目的地为(${X},${Y})
---设置传送门目的坐标[R]

---@param waygate unit
---@param x real
---@param y real
---@return nothing
cj.WaygateSetDestination = function(waygate, x, y)end


---@param playercount integer
---@return nothing
cj.SetPlayers = function(playercount)end

---设置${单位}对${玩家}${Rescuable/Unrescuable}
---设置可否营救(对玩家)[R]

---@param whichUnit unit
---@param byWhichPlayer player
---@param flag boolean
---@return nothing
cj.SetUnitRescuable = function(whichUnit, byWhichPlayer, flag)end

---到期的计时器
---到期的计时器
---响应'时间-计时器到期'事件.

---@param undefined nothing
---@return timer
cj.GetExpiredTimer = function(undefined)end


---@param whichGameType gametype
---@param value boolean
---@return nothing
cj.SetGameTypeSupported = function(whichGameType, value)end


---@param whichQuest quest
---@return nothing
cj.DestroyQuest = function(whichQuest)end

---设置${MapFlag}为${On/Off}
---设置地图参数

---@param whichMapFlag mapflag
---@param value boolean
---@return nothing
cj.SetMapFlag = function(whichMapFlag, value)end

---设定游戏速度为${Speed}
---设定游戏速度
---你可以通过'游戏-锁定游戏速度'动作来锁定游戏速度.

---@param whichspeed gamespeed
---@return nothing
cj.SetGameSpeed = function(whichspeed)end


---@param whichPlacementType placement
---@return nothing
cj.SetGamePlacement = function(whichPlacementType)end


---@param whichDialog timerdialog
---@param title string
---@return nothing
cj.TimerDialogSetTitle = function(whichDialog, title)end

---改变${单位}的队伍颜色为${Color}
---改变队伍颜色
---改变队伍颜色并不会改变单位所属.

---@param whichUnit unit
---@param whichColor playercolor
---@return nothing
cj.SetUnitColor = function(whichUnit, whichColor)end


---@param t texttag
---@param fadepoint real
---@return nothing
cj.SetTextTagFadepoint = function(t, fadepoint)end

---设置当前游戏难度为${GameDifficulty}
---设置游戏难度[R]
---游戏难度只是作为运行AI的一个参考值,没有AI的地图该功能无用.

---@param whichdifficulty gamedifficulty
---@return nothing
cj.SetGameDifficulty = function(whichdifficulty)end


---@param whichGroup group
---@param whichPlayer player
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsOfPlayer = function(whichGroup, whichPlayer, filter)end

---清空${单位组}内所有单位
---清空单位组
---并不影响单位本身.

---@param whichGroup group
---@return nothing
cj.GroupClear = function(whichGroup)end


---@param whichdensity mapdensity
---@return nothing
cj.SetResourceDensity = function(whichdensity)end

---购买者
---购买者
---响应'出售单位','出售物品'或'抵押物品'单位事件.

---@param undefined nothing
---@return unit
cj.GetBuyingUnit = function(undefined)end


---@param whichdensity mapdensity
---@return nothing
cj.SetCreatureDensity = function(whichdensity)end


---@param whichHero unit
---@return boolean
cj.IsUnitPaused = function(whichHero)end

---清空${玩家组}内所有玩家
---清空玩家组
---并不影响玩家本身.

---@param whichForce force
---@return nothing
cj.ForceClear = function(whichForce)end


---@param whichStartLoc integer
---@param x real
---@param y real
---@return nothing
cj.DefineStartLocation = function(whichStartLoc, x, y)end


---@param whichQuest quest
---@param discovered boolean
---@return nothing
cj.QuestSetDiscovered = function(whichQuest, discovered)end


---@param whichStartLoc integer
---@param whichLocation location
---@return nothing
cj.DefineStartLocationLoc = function(whichStartLoc, whichLocation)end

---${单位类型}提供的人口数量
---单位提供人口数量(指定单位类型)

---@param unitId integer
---@return integer
cj.GetFoodMade = function(unitId)end

---新建图像:${Image}大小:(${X},${Y},${Z})创建点:(${X},${Y},${Z})原点坐标:(${X},${Y},${Z})图像类型:${Type}
---新建图像[R]
---使用'图像-设置永久渲染状态'动作才能显示图像.大小、创建点和原点格式为(X,Y,Z).创建点作为图像的左下角位置.会创建图像.

---@param file string
---@param sizeX real
---@param sizeY real
---@param sizeZ real
---@param posX real
---@param posY real
---@param posZ real
---@param originX real
---@param originY real
---@param originZ real
---@param imageType integer
---@return image
cj.CreateImage = function(file, sizeX, sizeY, sizeZ, posX, posY, posZ, originX, originY, originZ, imageType)end

---${Multiboard}是最小化的
---多面板最小化

---@param lb multiboard
---@return boolean
cj.IsMultiboardMinimized = function(lb)end


---@param whichTrigger trigger
---@param whichDialog dialog
---@return event
cj.TriggerRegisterDialogEvent = function(whichTrigger, whichDialog)end


---@param whichStartLoc integer
---@param prioSlotCount integer
---@return nothing
cj.SetStartLocPrioCount = function(whichStartLoc, prioSlotCount)end


---@param whichStartLoc integer
---@param prioSlotIndex integer
---@param otherStartLocIndex integer
---@param priority startlocprio
---@return nothing
cj.SetStartLocPrio = function(whichStartLoc, prioSlotIndex, otherStartLocIndex, priority)end

---${单位}的默认主动攻击范围
---默认主动攻击范围

---@param whichUnit unit
---@return real
cj.GetUnitDefaultAcquireRange = function(whichUnit)end


---@param whichItem item
---@param flag boolean
---@return nothing
cj.SetItemInvulnerable = function(whichItem, flag)end


---@param whichForce force
---@param whichPlayer player
---@param filter boolexpr
---@return nothing
cj.ForceEnumAllies = function(whichForce, whichPlayer, filter)end


---@param whichStartLoc integer
---@param prioSlotIndex integer
---@return integer
cj.GetStartLocPrioSlot = function(whichStartLoc, prioSlotIndex)end

---${英雄}的未分配技能点数
---未分配技能点数

---@param whichHero unit
---@return integer
cj.GetHeroSkillPoints = function(whichHero)end

---队伍数量
---队伍数量

---@param undefined nothing
---@return integer
cj.GetTeams = function(undefined)end

---玩家数量
---玩家数量
---地图编辑器中开启的玩家数量(1-12).

---@param undefined nothing
---@return integer
cj.GetPlayers = function(undefined)end

---本地玩家
---本地玩家[R]
---指代玩家自己,所以对每个玩家返回值都不一样.如果不清楚该函数的话千万别用,因为很可能因为不同步而导致掉线.

---@param undefined nothing
---@return player
cj.GetLocalPlayer = function(undefined)end

---${单位}的面向角度
---面向角度
---采用角度制.0度为正东方向,90度为正北方向.

---@param whichUnit unit
---@return real
cj.GetUnitFacing = function(whichUnit)end

---${Trigger}的触发动作运行次数
---触发动作运行次数

---@param whichTrigger trigger
---@return integer
cj.GetTriggerExecCount = function(whichTrigger)end


---@param whichGameType gametype
---@return boolean
cj.IsGameTypeSupported = function(whichGameType)end


---@param whichPlayer player
---@param x real
---@param y real
---@param addBlight boolean
---@return nothing
cj.SetBlightPoint = function(whichPlayer, x, y, addBlight)end

---命令${单位}丢弃物品${物品}到坐标:(${X},${Y})
---发布丢弃物品命令(指定坐标)[R]

---@param whichUnit unit
---@param whichItem item
---@param x real
---@param y real
---@return boolean
cj.UnitDropItemPoint = function(whichUnit, whichItem, x, y)end

---${MapFlag}已设置
---地图参数设置

---@param whichMapFlag mapflag
---@return boolean
cj.IsMapFlagSet = function(whichMapFlag)end

---清空玩家屏幕上的文本信息
---清空文本信息(所有玩家)[R]

---@param undefined nothing
---@return nothing
cj.ClearTextMessages = function(undefined)end

---${可破坏物}的闭塞高度
---闭塞高度

---@param d destructable
---@return real
cj.GetDestructableOccluderHeight = function(d)end

---设置${Player}交纳给${Player}的${Resource}所得税为${Rate}%
---设置税率[R]
---缴纳所得税所损失的资源可以通过'玩家得分'的'税务损失的黄金/木材'来获取.所得税最高为100%.且玩家1对玩家2和玩家3都交纳80%所得税.则玩家1采集黄金时将给玩家28黄金,玩家32黄金.

---@param sourcePlayer player
---@param otherPlayer player
---@param whichResource playerstate
---@param rate integer
---@return nothing
cj.SetPlayerTaxRate = function(sourcePlayer, otherPlayer, whichResource, rate)end


---@param undefined nothing
---@return gametype
cj.GetGameTypeSelected = function(undefined)end

---新建的空单位组
---新建的单位组[R]
---会创建单位组.

---@param undefined nothing
---@return group
cj.CreateGroup = function(undefined)end

---对${单位}发布${Order}命令到目标点:${指定点}
---发布命令(指定点)

---@param whichUnit unit
---@param order string
---@param whichLocation location
---@return boolean
cj.IssuePointOrderLoc = function(whichUnit, order, whichLocation)end

---${单位}的当前主动攻击范围
---当前主动攻击范围

---@param whichUnit unit
---@return real
cj.GetUnitAcquireRange = function(whichUnit)end


---@param undefined nothing
---@return placement
cj.GetGamePlacement = function(undefined)end

---当前游戏速度
---当前游戏速度

---@param undefined nothing
---@return gamespeed
cj.GetGameSpeed = function(undefined)end


---@param soundHandle sound
---@return nothing
cj.KillSoundWhenDone = function(soundHandle)end

---${点}的X轴坐标
---点的X轴坐标

---@param whichLocation location
---@return real
cj.GetLocationX = function(whichLocation)end

---当前游戏难度
---当前游戏难度

---@param undefined nothing
---@return gamedifficulty
cj.GetGameDifficulty = function(undefined)end

---${单位}的等级
---单位等级
---对于英雄则会返回其英雄等级.

---@param whichUnit unit
---@return integer
cj.GetUnitLevel = function(whichUnit)end


---@param undefined nothing
---@return mapdensity
cj.GetResourceDensity = function(undefined)end

---设置${单位}的状态为${显示/隐藏}
---显示/隐藏[R]
---隐藏单位不会被'区域内单位'所选取.

---@param whichUnit unit
---@param show boolean
---@return nothing
cj.ShowUnit = function(whichUnit, show)end


---@param undefined nothing
---@return mapdensity
cj.GetCreatureDensity = function(undefined)end


---@param whichStartLocation integer
---@return real
cj.GetStartLocationX = function(whichStartLocation)end


---@param whichWidget widget
---@return real
cj.GetWidgetLife = function(whichWidget)end


---@param whichStartLocation integer
---@return real
cj.GetStartLocationY = function(whichStartLocation)end

---删除缓存${GameCache}中${Category}类别
---删除类别
---清空该类别下的所有缓存数据.

---@param cache gamecache
---@param missionKey string
---@return nothing
cj.FlushStoredMission = function(cache, missionKey)end


---@param whichStartLocation integer
---@return location
cj.GetStartLocationLoc = function(whichStartLocation)end

---学习技能
---学习技能[R]
---响应'学习技能'单位事件,指代被学习的技能.

---@param undefined nothing
---@return integer
cj.GetLearnedSkill = function(undefined)end


---@param undefined nothing
---@return camerasetup
cj.CreateCameraSetup = function(undefined)end


---@param abilityString string
---@param t effecttype
---@param x real
---@param y real
---@return effect
cj.AddSpellEffect = function(abilityString, t, x, y)end

---设置${Player}的队伍为${队伍ID}
---设置玩家队伍

---@param whichPlayer player
---@param whichTeam integer
---@return nothing
cj.SetPlayerTeam = function(whichPlayer, whichTeam)end

---${Multiboard}的行数
---行数

---@param lb multiboard
---@return integer
cj.MultiboardGetRowCount = function(lb)end


---@param whichPlayer player
---@param startLocIndex integer
---@return nothing
cj.SetPlayerStartLocation = function(whichPlayer, startLocIndex)end


---@param whichPlayer player
---@param startLocIndex integer
---@return nothing
cj.ForcePlayerStartLocation = function(whichPlayer, startLocIndex)end

---删除${可破坏物}
---删除

---@param d destructable
---@return nothing
cj.RemoveDestructable = function(d)end

---命令${Player}对${Player}设置${AllianceType}${On/Off}
---设置联盟状态(指定项目)[R]
---注意:可以对玩家自己设置联盟状态.可用来实现一些特殊效果.

---@param sourcePlayer player
---@param otherPlayer player
---@param whichAllianceSetting alliancetype
---@param value boolean
---@return nothing
cj.SetPlayerAlliance = function(sourcePlayer, otherPlayer, whichAllianceSetting, value)end


---@param whichPlayer player
---@param whichRacePreference racepreference
---@return nothing
cj.SetPlayerRacePreference = function(whichPlayer, whichRacePreference)end

---对${玩家}在屏幕位移(${X},${Y})处显示文本:${文字}
---对玩家显示文本消息(自动限时)[R]
---显示时间取决于文字长度.位移的取值在0-1之间.可使用'本地玩家'实现对所有玩家发送消息.

---@param toPlayer player
---@param x real
---@param y real
---@param message string
---@return nothing
cj.DisplayTextToPlayer = function(toPlayer, x, y, message)end


---@param whichPlayer player
---@param value boolean
---@return nothing
cj.SetPlayerRaceSelectable = function(whichPlayer, value)end

---${指定点}在${Player}的黑色阴影内
---点在黑色阴影中

---@param whichLocation location
---@param whichPlayer player
---@return boolean
cj.IsLocationMaskedToPlayer = function(whichLocation, whichPlayer)end


---@param undefined nothing
---@return nothing
cj.ResetTerrainFog = function(undefined)end

---联盟颜色显示设置
---联盟颜色显示设置
---0为不开启.1为小地图显示.2为小地图和游戏都显示.

---@param undefined nothing
---@return integer
cj.GetAllyColorFilterState = function(undefined)end


---@param whichPlayer player
---@param controlType mapcontrol
---@return nothing
cj.SetPlayerController = function(whichPlayer, controlType)end


---@param undefined nothing
---@return playerstate
cj.GetEventPlayerState = function(undefined)end

---使${单位}的${技能}等级降低1级
---降低技能等级[R]
---改变死亡单位的光环技能会导致魔兽崩溃.

---@param whichUnit unit
---@param abilcode integer
---@return integer
cj.DecUnitAbilityLevel = function(whichUnit, abilcode)end


---@param modelName string
---@return nothing
cj.PlayModelCinematic = function(modelName)end


---@param whichBolt lightning
---@return boolean
cj.DestroyLightning = function(whichBolt)end

---新建区域
---新建区域[R]
---会创建一个新的不规则区域,如果不往该区域添加点或地区,则该区域无效果.

---@param undefined nothing
---@return region
cj.CreateRegion = function(undefined)end

---将${Player}的玩家颜色改为${Color}
---改变玩家颜色[R]
---不改变现有单位的颜色.

---@param whichPlayer player
---@param color playercolor
---@return nothing
cj.SetPlayerColor = function(whichPlayer, color)end


---@param whichType itemtype
---@param level integer
---@return integer
cj.ChooseRandomItemEx = function(whichType, level)end

---设置${Player}${Show/Hide}在计分屏的显示.
---显示/隐藏计分屏显示[R]

---@param whichPlayer player
---@param flag boolean
---@return nothing
cj.SetPlayerOnScoreScreen = function(whichPlayer, flag)end

---命令${单位}使用${物品},目标坐标:(${X},${Y})
---使用物品(指定坐标)

---@param whichUnit unit
---@param whichItem item
---@param x real
---@param y real
---@return boolean
cj.UnitUseItemPoint = function(whichUnit, whichItem, x, y)end

---更改${Player}的名字为${文字}
---更改名字

---@param whichPlayer player
---@param name string
---@return nothing
cj.SetPlayerName = function(whichPlayer, name)end

---${Player}所属队伍编号
---玩家队伍

---@param whichPlayer player
---@return integer
cj.GetPlayerTeam = function(whichPlayer)end

---设置${Leaderboard}的文字颜色为(${Red},${Green},${Blue})Alpha通道值为:${Transparency}
---设置文字颜色[R]
---颜色格式为(红,绿,蓝).Alpha通道值0为不可见.颜色值和Alpha通道值取值范围为0-255.

---@param lb leaderboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.LeaderboardSetLabelColor = function(lb, red, green, blue, alpha)end

---重新设置${矩形区域},左下角坐标为(${X},${Y}),右上角坐标为(${X},${Y})
---设置矩形区域(指定坐标)[R]
---该区域必须是一个变量.重新设置矩形区域的大小和位置.

---@param whichRect rect
---@param minx real
---@param miny real
---@param maxx real
---@param maxy real
---@return nothing
cj.SetRect = function(whichRect, minx, miny, maxx, maxy)end

---${Player}的名字
---玩家名字

---@param whichPlayer player
---@return string
cj.GetPlayerName = function(whichPlayer)end


---@param whichPlayer player
---@return integer
cj.GetPlayerStartLocation = function(whichPlayer)end

---${物品}是被持有的
---物品被持有
---在物品栏中的物品都是被持有的.就算单位正处于死亡状态.

---@param whichItem item
---@return boolean
cj.IsItemOwned = function(whichItem)end


---@param whichPlayer player
---@return real
cj.GetPlayerStartLocationX = function(whichPlayer)end

---增加${Hero}${Quantity}点经验值,${Show/Hide}升级动画
---增加经验值[R]
---经验值不能倒退.

---@param whichHero unit
---@param xpToAdd integer
---@param showEyeCandy boolean
---@return nothing
cj.AddHeroXP = function(whichHero, xpToAdd, showEyeCandy)end


---@param whichPlayer player
---@return real
cj.GetPlayerStartLocationY = function(whichPlayer)end

---删除${物品池}
---删除物品池[R]

---@param whichItemPool itempool
---@return nothing
cj.DestroyItemPool = function(whichItemPool)end

---重置${Ubersplat}
---重置地面纹理变化

---@param whichSplat ubersplat
---@return nothing
cj.ResetUbersplat = function(whichSplat)end

---${Player}的颜色
---玩家颜色

---@param whichPlayer player
---@return playercolor
cj.GetPlayerColor = function(whichPlayer)end

---${Player}的游戏状态
---玩家游戏状态

---@param whichPlayer player
---@return playerslotstate
cj.GetPlayerSlotState = function(whichPlayer)end

---存档文件名
---存档文件名
---响应'游戏-保存进度'事件.

---@param undefined nothing
---@return string
cj.GetSaveBasicFilename = function(undefined)end

---${Player}需要交纳给${Player}的${Resource}所得税
---玩家税率[R]
---所得税取值范围0-100.

---@param sourcePlayer player
---@param otherPlayer player
---@param whichResource playerstate
---@return integer
cj.GetPlayerTaxRate = function(sourcePlayer, otherPlayer, whichResource)end

---关闭${Trigger}
---关闭触发

---@param whichTrigger trigger
---@return nothing
cj.DisableTrigger = function(whichTrigger)end


---@param undefined nothing
---@return nothing
cj.EndThematicMusic = function(undefined)end

---${单位}的默认飞行高度
---默认飞行高度
---飞行单位可以直接改变飞行高度.其他单位通过添加/删除替换为飞行单位的变身技能(如乌鸦形态)之后,也能改变飞行高度.

---@param whichUnit unit
---@return real
cj.GetUnitDefaultFlyHeight = function(whichUnit)end

---${Player}选择了${RacePreference}
---玩家的种族选择

---@param whichPlayer player
---@param pref racepreference
---@return boolean
cj.IsPlayerRacePrefSet = function(whichPlayer, pref)end

---清除${点}
---清除点[R]
---点是堆积最多的垃圾资源,不需要再使用的点都要记得清除掉.

---@param whichLocation location
---@return nothing
cj.RemoveLocation = function(whichLocation)end

---移动${点}到(${X},${Y})
---移动点[R]
---该点必须是一个变量.因为移动一个不可重用的点是无意义的.

---@param whichLocation location
---@param newX real
---@param newY real
---@return nothing
cj.MoveLocation = function(whichLocation, newX, newY)end

---${点}的Z轴高度
---点的Z轴高度[R]

---@param whichLocation location
---@return real
cj.GetLocationZ = function(whichLocation)end

---${技能}的${EffectType},绑定到${单位}的${String}附加点
---新建特效(指定技能，创建到单位)[R]
---会创建特效.

---@param abilityId integer
---@param t effecttype
---@param targetWidget widget
---@param attachPoint string
---@return effect
cj.AddSpellEffectTargetById = function(abilityId, t, targetWidget, attachPoint)end

---删除${计时器}
---删除计时器[R]
---一般来说,计时器并不需要删除.只为某些有特别需求的用户提供.

---@param whichTimer timer
---@return nothing
cj.DestroyTimer = function(whichTimer)end

---运行${计时器}，周期:${时间}秒，模式:${模式}，运行函数:${函数}
---运行计时器[C]
---等同于TimerStart

---@param whichTimer timer
---@param timeout real
---@param periodic boolean
---@param handlerFunc code
---@return nothing
cj.TimerStart = function(whichTimer, timeout, periodic, handlerFunc)end

---事件响应-触发可追踪物
---事件响应-触发可追踪物[R]

---@param undefined nothing
---@return trackable
cj.GetTriggeringTrackable = function(undefined)end

---设置${可破坏物}的状态为${Show/Hide}
---显示/隐藏[R]
---隐藏的可破坏物不被显示,但仍影响通行和视线.

---@param d destructable
---@param flag boolean
---@return nothing
cj.ShowDestructable = function(d, flag)end

---对${单位组}发布${Order}命令,目标点:(${X},${Y})
---发布命令(指定坐标)[R]
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order string
---@param x real
---@param y real
---@return boolean
cj.GroupPointOrder = function(whichGroup, order, x, y)end

---${计时器}设置的时间
---设置时间

---@param whichTimer timer
---@return real
cj.TimerGetTimeout = function(whichTimer)end


---@param whichSetup camerasetup
---@return real
cj.CameraSetupGetDestPositionY = function(whichSetup)end


---@param whichItem item
---@param whichPlayer player
---@param changeColor boolean
---@return nothing
cj.SetItemPlayer = function(whichItem, whichPlayer, changeColor)end


---@param unitId integer
---@return boolean
cj.IsHeroUnitId = function(unitId)end

---${Player}的当前对战比赛得分
---对战比赛得分
---对战游戏时如果游戏时间过长,系统将以该值来决定胜负.

---@param whichPlayer player
---@return integer
cj.GetTournamentScore = function(whichPlayer)end

---${计时器}的逝去时间
---逝去时间

---@param whichTimer timer
---@return real
cj.TimerGetElapsed = function(whichTimer)end


---@param whichDialog dialog
---@param messageText string
---@return nothing
cj.DialogSetMessage = function(whichDialog, messageText)end

---${英雄}的敏捷值(${Include/Exclude}加成)
---英雄敏捷[R]

---@param whichHero unit
---@param includeBonuses boolean
---@return integer
cj.GetHeroAgi = function(whichHero, includeBonuses)end

---${计时器}的剩余时间
---剩余时间

---@param whichTimer timer
---@return real
cj.TimerGetRemaining = function(whichTimer)end

---暂停${计时器}
---暂停计时器[R]

---@param whichTimer timer
---@return nothing
cj.PauseTimer = function(whichTimer)end


---@param func code
---@return conditionfunc
cj.Condition = function(func)end


---@param undefined nothing
---@return eventid
cj.GetTriggerEventId = function(undefined)end

---${指定点}在${Player}的迷雾范围内
---点在迷雾中
---黑色阴影内的点不被计算在内.

---@param whichLocation location
---@param whichPlayer player
---@return boolean
cj.IsLocationFoggedToPlayer = function(whichLocation, whichPlayer)end

---${变量}的值${Operation}${值}
---实数变量事件
---这个事件只适用于实数类型的变量.

---@param whichTrigger trigger
---@param varName string
---@param opcode limitop
---@param limitval real
---@return event
cj.TriggerRegisterVariableEvent = function(whichTrigger, varName, opcode, limitval)end


---@param c conditionfunc
---@return nothing
cj.DestroyCondition = function(c)end


---@param func code
---@return filterfunc
cj.Filter = function(func)end


---@param whichForce force
---@param whichPlayer player
---@param filter boolexpr
---@return nothing
cj.ForceEnumEnemies = function(whichForce, whichPlayer, filter)end


---@param d destructable
---@param max real
---@return nothing
cj.SetDestructableMaxLife = function(d, max)end


---@param f filterfunc
---@return nothing
cj.DestroyFilter = function(f)end


---@param e boolexpr
---@return nothing
cj.DestroyBoolExpr = function(e)end

---设置${多面板项目}的项目文本为${文字}
---设置指定项目文本[R]

---@param mbi multiboarditem
---@param val string
---@return nothing
cj.MultiboardSetItemValue = function(mbi, val)end


---@param operandA boolexpr
---@param operandB boolexpr
---@return boolexpr
cj.And = function(operandA, operandB)end


---@param whichTrigger trigger
---@param whichUnit unit
---@param whichEvent unitevent
---@param filter boolexpr
---@return event
cj.TriggerRegisterFilterUnitEvent = function(whichTrigger, whichUnit, whichEvent, filter)end


---@param operand boolexpr
---@return boolexpr
cj.Not = function(operand)end

---删除${不规则区域}
---删除不规则区域[R]

---@param whichRegion region
---@return nothing
cj.RemoveRegion = function(whichRegion)end

---对${不规则区域}添加${矩形区域}
---添加区域[R]
---区域是游戏中一个游戏地区的集合体,可以包含地区和点.

---@param whichRegion region
---@param r rect
---@return nothing
cj.RegionAddRect = function(whichRegion, r)end


---@param  string
---@return integer
cj.UnitId = function()end

---在${不规则区域}中移除${矩形区域}
---移除区域[R]

---@param whichRegion region
---@param r rect
---@return nothing
cj.RegionClearRect = function(whichRegion, r)end


---@param s sound
---@param offset real
---@return nothing
cj.TriggerWaitForSound = function(s, offset)end

---对${不规则区域}添加单元点:(${X},${Y})
---添加单元点(指定坐标)[R]
---单元点大小为32x32.

---@param whichRegion region
---@param x real
---@param y real
---@return nothing
cj.RegionAddCell = function(whichRegion, x, y)end

---对${不规则区域}添加单元点:${点}
---添加单元点(指定点)[R]
---单元点大小为32x32.

---@param whichRegion region
---@param whichLocation location
---@return nothing
cj.RegionAddCellAtLoc = function(whichRegion, whichLocation)end

---原所有者
---原所有者
---响应'改变所有者'单位事件,指代单位原来的所有者.

---@param undefined nothing
---@return player
cj.GetChangingUnitPrevOwner = function(undefined)end

---在${不规则区域}中移除单元点:(${X},${Y})
---移除单元点(指定坐标)[R]
---单元点大小为32x32.

---@param whichRegion region
---@param x real
---@param y real
---@return nothing
cj.RegionClearCell = function(whichRegion, x, y)end

---在${不规则区域}中移除单元点:${点}
---移除单元点(指定点)[R]
---单元点大小为32x32.

---@param whichRegion region
---@param whichLocation location
---@return nothing
cj.RegionClearCellAtLoc = function(whichRegion, whichLocation)end

---${不规则区域}内存在${单位}
---在不规则区域内[R]

---@param whichRegion region
---@param whichUnit unit
---@return boolean
cj.IsUnitInRegion = function(whichRegion, whichUnit)end

---${不规则区域}内包含点:${点}
---包含点
---TC_REGION

---@param whichRegion region
---@param whichLocation location
---@return boolean
cj.IsLocationInRegion = function(whichRegion, whichLocation)end

---对${单位组}发布${Order}命令,目标:${单位}
---发布命令(指定单位)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order string
---@param targetWidget widget
---@return boolean
cj.GroupTargetOrder = function(whichGroup, order, targetWidget)end

---左下角为(${X1},${Y1}),右上角为(${X2},${Y2})的矩形区域
---新建矩形区域(指定边角坐标)
---会创建矩形区域.

---@param minx real
---@param miny real
---@param maxx real
---@param maxy real
---@return rect
cj.Rect = function(minx, miny, maxx, maxy)end

---左下角为${点1},右上角为${点2}的矩形区域
---新建矩形区域(指定边角点)
---会创建矩形区域.

---@param min location
---@param max location
---@return rect
cj.RectFromLoc = function(min, max)end


---@param undefined nothing
---@return nothing
cj.ForceQuestDialogUpdate = function(undefined)end

---为玩家${玩家}创建一个${单位}在(X坐标:${输入坐标}Y坐标:${输入坐标}),面向角度:${facing}
---创建单位(指定坐标)[C]
---不能被'最后创建的单位'捕获之

---@param id player
---@param unitid integer
---@param x real
---@param y real
---@param face real
---@return unit
cj.CreateUnit = function(id, unitid, x, y, face)end

---${开启/关闭}信箱模式,转换时间为${Duration}秒
---开启/关闭信箱模式(所有玩家)[R]
---使用电影镜头模式,隐藏游戏界面.

---@param flag boolean
---@param fadeDuration real
---@return nothing
cj.ShowInterface = function(flag, fadeDuration)end

---删除${矩形区域}
---删除矩形区域[R]

---@param whichRect rect
---@return nothing
cj.RemoveRect = function(whichRect)end

---${矩形区域}的中心X坐标
---中心X坐标

---@param whichRect rect
---@return real
cj.GetRectCenterX = function(whichRect)end

---${矩形区域}的中心Y坐标
---中心Y坐标

---@param whichRect rect
---@return real
cj.GetRectCenterY = function(whichRect)end

---锁定${单位}的${Source}朝向${目标单位},偏移坐标(${X},${Y},${Z})
---锁定身体朝向
---单位的该身体部件会一直朝向目标单位的偏移坐标点处,直到使用'重置身体朝向'.坐标偏移以目标单位脚下为坐标原点.

---@param whichUnit unit
---@param whichBone string
---@param lookAtTarget unit
---@param offsetX real
---@param offsetY real
---@param offsetZ real
---@return nothing
cj.SetUnitLookAt = function(whichUnit, whichBone, lookAtTarget, offsetX, offsetY, offsetZ)end

---移动${矩形区域}到(${X},${Y})
---移动矩形区域(指定坐标)[R]
---该区域必须是一个变量.目标点将作为该区域的新中心点.

---@param whichRect rect
---@param newCenterX real
---@param newCenterY real
---@return nothing
cj.MoveRectTo = function(whichRect, newCenterX, newCenterY)end


---@param whichPlayer player
---@param whichPlayerState playerstate
---@param value integer
---@return nothing
cj.SetPlayerState = function(whichPlayer, whichPlayerState, value)end

---移动${物品}到(${X},${Y})
---移动物品到坐标(立即)(指定坐标)[R]

---@param i item
---@param x real
---@param y real
---@return nothing
cj.SetItemPosition = function(i, x, y)end

---移动${矩形区域}到${目标点}
---移动矩形区域(指定点)
---该区域必须是一个变量.目标点将作为该区域的新中心点.

---@param whichRect rect
---@param newCenterLoc location
---@return nothing
cj.MoveRectToLoc = function(whichRect, newCenterLoc)end

---${矩形区域}的左下角X坐标
---左下角X坐标

---@param whichRect rect
---@return real
cj.GetRectMinX = function(whichRect)end


---@param whichSetup camerasetup
---@param zDestOffset real
---@return nothing
cj.CameraSetupApplyWithZ = function(whichSetup, zDestOffset)end


---@param whichTrigger trigger
---@return nothing
cj.TriggerClearConditions = function(whichTrigger)end

---缓存:${GameCache}类别名:${Category}使用名称:${文字}记录:${实数}
---记录实数
---使用'游戏缓存-读取实数'来读取该数值.名称和类别名不能包含空格.

---@param cache gamecache
---@param missionKey string
---@param key string
---@param value real
---@return nothing
cj.StoreReal = function(cache, missionKey, key, value)end


---@param whichIntegerGameState igamestate
---@return integer
cj.GetIntegerGameState = function(whichIntegerGameState)end

---${矩形区域}的左下角Y坐标
---左下角Y坐标

---@param whichRect rect
---@return real
cj.GetRectMinY = function(whichRect)end

---删除${Ubersplat}
---删除地面纹理变化

---@param whichSplat ubersplat
---@return nothing
cj.DestroyUbersplat = function(whichSplat)end

---设置${Hero}的经验值为${Quantity},${Show/Hide}升级动画
---设置经验值
---经验值不能倒退.

---@param whichHero unit
---@param newXpVal integer
---@param showEyeCandy boolean
---@return nothing
cj.SetHeroXP = function(whichHero, newXpVal, showEyeCandy)end


---@param whichTrigger trigger
---@param whichUnit unit
---@param whichState unitstate
---@param opcode limitop
---@param limitval real
---@return event
cj.TriggerRegisterUnitStateEvent = function(whichTrigger, whichUnit, whichState, opcode, limitval)end

---${矩形区域}的右上角X坐标
---右上角X坐标

---@param whichRect rect
---@return real
cj.GetRectMaxX = function(whichRect)end

---${单位}的当前移动速度
---当前移动速度

---@param whichUnit unit
---@return real
cj.GetUnitMoveSpeed = function(whichUnit)end

---${矩形区域}的右上角Y坐标
---右上角Y坐标

---@param whichRect rect
---@return real
cj.GetRectMaxY = function(whichRect)end


---@param d destructable
---@return boolean
cj.IsDestructableInvulnerable = function(d)end

---${镜头}的目标点
---镜头目标点
---会创建点.

---@param whichSetup camerasetup
---@return location
cj.CameraSetupGetDestPositionLoc = function(whichSetup)end


---@param undefined nothing
---@return widget
cj.GetOrderTarget = function(undefined)end


---@param undefined nothing
---@return nothing
cj.PreloadGenStart = function(undefined)end


---@param whichPlayer player
---@return nothing
cj.CachePlayerHeroData = function(whichPlayer)end


---@param undefined nothing
---@return rect
cj.GetWorldBounds = function(undefined)end

---当前镜头源位置
---当前镜头源位置
---会创建点.注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return location
cj.GetCameraEyePositionLoc = function(undefined)end

---为${玩家}设置${FogStateVisible}在${矩形区域}(对盟友${共享}视野)
---设置地图迷雾(矩形区域)[R]

---@param forWhichPlayer player
---@param whichState fogstate
---@param where rect
---@param useSharedVision boolean
---@return nothing
cj.SetFogStateRect = function(forWhichPlayer, whichState, where, useSharedVision)end

---为${玩家}设置${FogStateVisible}在圆心为(${X},${Y})半径为${数值}的范围,(对盟友${共享}视野)
---设置地图迷雾(圆范围)[R]

---@param forWhichPlayer player
---@param whichState fogstate
---@param centerx real
---@param centerY real
---@param radius real
---@param useSharedVision boolean
---@return nothing
cj.SetFogStateRadius = function(forWhichPlayer, whichState, centerx, centerY, radius, useSharedVision)end


---@param forWhichPlayer player
---@param whichState fogstate
---@param center location
---@param radius real
---@param useSharedVision boolean
---@return nothing
cj.SetFogStateRadiusLoc = function(forWhichPlayer, whichState, center, radius, useSharedVision)end

---黑色阴影开启
---黑色阴影开启

---@param undefined nothing
---@return boolean
cj.IsFogMaskEnabled = function(undefined)end

---${启用/禁用}战争迷雾
---启用/禁用战争迷雾[R]

---@param enable boolean
---@return nothing
cj.FogEnable = function(enable)end

---缓存:${GameCache}类别名:${Category}使用名称:${文字}记录:${整数}
---记录整数
---使用'游戏缓存-读取整数'来读取该数值.名称和类别名不能包含空格.

---@param cache gamecache
---@param missionKey string
---@param key string
---@param value integer
---@return nothing
cj.StoreInteger = function(cache, missionKey, key, value)end

---新建特效${ModelFile}在${指定点}处
---新建特效(创建到点)[R]
---会创建特效.

---@param modelName string
---@param where location
---@return effect
cj.AddSpecialEffectLoc = function(modelName, where)end

---战争迷雾开启
---战争迷雾开启

---@param undefined nothing
---@return boolean
cj.IsFogEnabled = function(undefined)end


---@param whichUnit unit
---@param newAcquireRange real
---@return nothing
cj.SetUnitAcquireRange = function(whichUnit, newAcquireRange)end


---@param whichTrigger trigger
---@param whichUnit unit
---@param range real
---@param filter boolexpr
---@return event
cj.TriggerRegisterUnitInRange = function(whichTrigger, whichUnit, range, filter)end


---@param whichUnit unit
---@param whichItem item
---@return nothing
cj.UnitRemoveItem = function(whichUnit, whichItem)end

---新建的${玩家}可见度修正器.可见度:${FogStateVisible}影响区域:${矩形区域}(对盟友${共享}视野,${覆盖}单位视野)
---新建可见度修正器(矩形区域)[R]
---会创建可见度修正器.

---@param forWhichPlayer player
---@param whichState fogstate
---@param where rect
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
cj.CreateFogModifierRect = function(forWhichPlayer, whichState, where, useSharedVision, afterUnits)end

---${On/Off}水面变形
---开启/关闭水面变形
---开启时当发生地形变化时水面高度也会随着变化.对永久变形无效.

---@param val boolean
---@return nothing
cj.SetWaterDeforms = function(val)end

---新建的${玩家}可见度修正器.可见度:${FogStateVisible}圆心坐标:(${X},${Y})半径:${数值}(对盟友${共享}视野,${覆盖}单位视野)
---新建可见度修正器(圆范围)[R]
---会创建可见度修正器.

---@param forWhichPlayer player
---@param whichState fogstate
---@param centerx real
---@param centerY real
---@param radius real
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
cj.CreateFogModifierRadius = function(forWhichPlayer, whichState, centerx, centerY, radius, useSharedVision, afterUnits)end

---${物件}的名字
---物件名字

---@param d destructable
---@return string
cj.GetDestructableName = function(d)end

---启用${VisibilityModifier}
---启用可见度修正器

---@param whichFogModifier fogmodifier
---@return nothing
cj.FogModifierStart = function(whichFogModifier)end


---@param lb leaderboard
---@param ascending boolean
---@return nothing
cj.LeaderboardSortItemsByValue = function(lb, ascending)end

---设置${多面板}的所有项目颜色为(${Red},${Green},${Blue}),Alpha值为${Transparency}
---设置所有项目颜色[R]
---颜色格式为(红,绿,蓝).Alpha值为0是不可见的.颜色值和Alpha值取值范围为0-255.

---@param lb multiboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.MultiboardSetItemsValueColor = function(lb, red, green, blue, alpha)end


---@param whichUnit unit
---@return boolean
cj.IsUnitLoaded = function(whichUnit)end

---禁用${VisibilityModifier}
---禁用可见度修正器

---@param whichFogModifier fogmodifier
---@return nothing
cj.FogModifierStop = function(whichFogModifier)end

---新建触发
---新建触发[R]
---会创建一个新的触发器,如果对该功能不熟悉请慎用.

---@param undefined nothing
---@return trigger
cj.CreateTrigger = function(undefined)end

---坐标(${X},${Y})处的地形样式
---地形样式(指定坐标)[R]

---@param x real
---@param y real
---@return integer
cj.GetTerrainVariance = function(x, y)end

---${技能}的${EffectType},创建到坐标(${X},${Y})
---新建特效(指定技能，创建到坐标)[R]
---会创建特效.

---@param abilityId integer
---@param t effecttype
---@param x real
---@param y real
---@return effect
cj.AddSpellEffectById = function(abilityId, t, x, y)end

---删除${触发器}
---删除触发器[R]
---对不再使用的触发器可以使用该动作来删除.

---@param whichTrigger trigger
---@return nothing
cj.DestroyTrigger = function(whichTrigger)end


---@param whichTrigger trigger
---@return nothing
cj.ResetTrigger = function(whichTrigger)end

---开启${Trigger}
---开启触发

---@param whichTrigger trigger
---@return nothing
cj.EnableTrigger = function(whichTrigger)end

---${物品}的物品等级
---物品等级

---@param whichItem item
---@return integer
cj.GetItemLevel = function(whichItem)end

---${触发}处于开启状态
---触发开启

---@param whichTrigger trigger
---@return boolean
cj.IsTriggerEnabled = function(whichTrigger)end


---@param soundHandle sound
---@param channel integer
---@return nothing
cj.SetSoundChannel = function(soundHandle, channel)end


---@param whichTrigger trigger
---@param timeout real
---@param periodic boolean
---@return event
cj.TriggerRegisterTimerEvent = function(whichTrigger, timeout, periodic)end


---@param whichTrigger trigger
---@param t timer
---@return event
cj.TriggerRegisterTimerExpireEvent = function(whichTrigger, t)end


---@param whichTrigger trigger
---@param whichState gamestate
---@param opcode limitop
---@param limitval real
---@return event
cj.TriggerRegisterGameStateEvent = function(whichTrigger, whichState, opcode, limitval)end


---@param undefined nothing
---@return dialog
cj.GetClickedDialog = function(undefined)end

---${可破坏物}的当前生命值
---生命值

---@param d destructable
---@return real
cj.GetDestructableLife = function(d)end

---比赛剩余时间
---比赛剩余时间
---响应'比赛事件'游戏将要结束.单位为秒.

---@param undefined nothing
---@return real
cj.GetTournamentFinishSoonTimeRemaining = function(undefined)end

---设置${金矿}的黄金储量为${Quantity}
---设置黄金储量

---@param whichUnit unit
---@param amount integer
---@return nothing
cj.SetResourceAmount = function(whichUnit, amount)end

---比赛结束规则
---比赛结束规则
---1表示游戏开始时间已经超过限定时,无法以平局结束.其他值表示游戏还在初期阶段,此时退出游戏将以平局结束..

---@param undefined nothing
---@return integer
cj.GetTournamentFinishNowRule = function(undefined)end

---清空${Multiboard}
---清空多面板
---清空该多面板中的所有行和列.

---@param lb multiboard
---@return nothing
cj.MultiboardClear = function(lb)end


---@param introText string
---@return nothing
cj.SetIntroShotText = function(introText)end

---对${单位组}发布${Order}命令,目标:${指定点}
---发布命令(指定点)(ID)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order integer
---@param whichLocation location
---@return boolean
cj.GroupPointOrderByIdLoc = function(whichGroup, order, whichLocation)end


---@param undefined nothing
---@return player
cj.GetTournamentFinishNowPlayer = function(undefined)end


---@param whichUnit unit
---@return boolean
cj.IsUnitIllusion = function(whichUnit)end


---@param mbi multiboarditem
---@param iconFileName string
---@return nothing
cj.MultiboardSetItemIcon = function(mbi, iconFileName)end

---该游戏将在${EventType}后结束
---比赛游戏事件
---该事件只出现在Battle.net的自动匹配游戏.

---@param whichTrigger trigger
---@param whichGameEvent gameevent
---@return event
cj.TriggerRegisterGameEvent = function(whichTrigger, whichGameEvent)end

---单位所受伤害
---伤害值
---响应'受到伤害'单位事件,指代单位所受伤害.

---@param undefined nothing
---@return real
cj.GetEventDamage = function(undefined)end


---@param whichBolt lightning
---@return real
cj.GetLightningColorB = function(whichBolt)end


---@param undefined nothing
---@return player
cj.GetWinningPlayer = function(undefined)end

---${玩家}的${Property}属性${Operation}${值}
---属性事件

---@param whichTrigger trigger
---@param whichPlayer player
---@param whichState playerstate
---@param opcode limitop
---@param limitval real
---@return event
cj.TriggerRegisterPlayerStateEvent = function(whichTrigger, whichPlayer, whichState, opcode, limitval)end

---设置昼夜时间流逝速度为默认值的${Value}倍
---设置昼夜时间流逝速度[R]
---设置100%来恢复正常值.该值并不影响游戏速度.

---@param r real
---@return nothing
cj.SetTimeOfDayScale = function(r)end


---@param whichGroup group
---@return unit
cj.FirstOfGroup = function(whichGroup)end


---@param whichTrigger trigger
---@param whichPlayer player
---@param whichPlayerUnitEvent playerunitevent
---@param filter boolexpr
---@return event
cj.TriggerRegisterPlayerUnitEvent = function(whichTrigger, whichPlayer, whichPlayerUnitEvent, filter)end

---输入的聊天信息
---输入的聊天信息

---@param undefined nothing
---@return string
cj.GetEventPlayerChatString = function(undefined)end

---攻击单位
---攻击单位
---响应'被攻击'单位事件.

---@param undefined nothing
---@return unit
cj.GetAttacker = function(undefined)end

---研究科技的单位
---研究科技的单位
---响应'开始/取消/完成科技研究'单位事件.

---@param undefined nothing
---@return unit
cj.GetResearchingUnit = function(undefined)end

---使${玩家}对${单位}发布${Order}命令
---发布中介命令(无目标)(ID)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@return boolean
cj.IssueNeutralImmediateOrderById = function(forWhichPlayer, neutralStructure, unitId)end


---@param undefined nothing
---@return unit
cj.GetRescuer = function(undefined)end


---@param whichQuest quest
---@param title string
---@return nothing
cj.QuestSetTitle = function(whichQuest, title)end

---匹配单位
---匹配单位
---在'选取单位满足条件'之类功能的条件中,指代被判断单位.

---@param undefined nothing
---@return unit
cj.GetFilterUnit = function(undefined)end


---@param whichTrigger trigger
---@return nothing
cj.TriggerExecuteWait = function(whichTrigger)end


---@param undefined nothing
---@return unit
cj.GetKillingUnit = function(undefined)end

---腐化的单位
---腐化的单位
---响应'开始腐化'单位事件.

---@param undefined nothing
---@return unit
cj.GetDecayingUnit = function(undefined)end

---为${单位组}添加以${点}为圆心，${半径}为半径的圆范围内，满足${条件}的单位。无效项(${N})
---选取单位添加到单位组(点)(不建议使用)
---最后一项是无效项，建议用上一个UI

---@param whichGroup group
---@param whichLocation location
---@param radius real
---@param filter boolexpr
---@param countLimit integer
---@return nothing
cj.GroupEnumUnitsInRangeOfLocCounted = function(whichGroup, whichLocation, radius, filter, countLimit)end

---${多面板}的第${X}行,第${Y}列项
---多面板项目[R]
---(0,0)作为多面板首项,会创建多面板项目.

---@param lb multiboard
---@param row integer
---@param column integer
---@return multiboarditem
cj.MultiboardGetItem = function(lb, row, column)end

---正在建造的建筑
---正在建造的建筑
---响应'开始建造建筑'单位事件.

---@param undefined nothing
---@return unit
cj.GetConstructingStructure = function(undefined)end

---设置${排行榜}${Show/Hide}
---显示/隐藏[R]
---排行榜不能在地图初始化时显示.

---@param lb leaderboard
---@param show boolean
---@return nothing
cj.LeaderboardDisplay = function(lb, show)end


---@param undefined nothing
---@return real
cj.GetCameraBoundMaxX = function(undefined)end

---完成的建筑
---完成的建筑
---响应'完成建造建筑'单位事件.

---@param undefined nothing
---@return unit
cj.GetConstructedStructure = function(undefined)end

---训练单位类型
---训练单位类型
---响应'开始/取消/完成训练单位'单位事件,指代所训练的单位类型.

---@param undefined nothing
---@return integer
cj.GetTrainedUnitType = function(undefined)end


---@param whichHero unit
---@param level integer
---@param showEyeCandy boolean
---@return nothing
cj.SetHeroLevel = function(whichHero, level, showEyeCandy)end

---被研究科技
---被研究科技
---响应'开始/取消/完成科技研究'单位事件.

---@param undefined nothing
---@return integer
cj.GetResearched = function(undefined)end


---@param whichUnit unit
---@param order integer
---@param x real
---@param y real
---@param instantTargetWidget widget
---@return boolean
cj.IssueInstantPointOrderById = function(whichUnit, order, x, y, instantTargetWidget)end

---新建的弹坑变形.中心坐标:(${X},${Y})半径:${Radius}深度:${Depth}持续时间:${Duration}毫秒,变化类型:${Type}
---新建地形变化:弹坑[R]
---深度可取负数.永久地形变化在保存游戏时不会被记录.

---@param x real
---@param y real
---@param radius real
---@param depth real
---@param duration integer
---@param permanent boolean
---@return terraindeformation
cj.TerrainDeformCrater = function(x, y, radius, depth, duration, permanent)end


---@param whichTrigger trigger
---@param whichCondition triggercondition
---@return nothing
cj.TriggerRemoveCondition = function(whichTrigger, whichCondition)end

---训练单位
---训练单位
---响应'完成训练单位'单位事件,指代被训练单位.

---@param undefined nothing
---@return unit
cj.GetTrainedUnit = function(undefined)end

---贩卖者
---贩卖者
---响应'出售单位','出售物品'或'抵押物品'单位事件.

---@param undefined nothing
---@return unit
cj.GetSellingUnit = function(undefined)end

---${Player}拥有的非建筑单位数量(${Include/Exclude}未完成的)
---非建筑单位数量

---@param whichPlayer player
---@param includeIncomplete boolean
---@return integer
cj.GetPlayerUnitCount = function(whichPlayer, includeIncomplete)end


---@param objectid integer
---@param x real
---@param y real
---@param face real
---@param scale real
---@param variation integer
---@return destructable
cj.CreateDestructable = function(objectid, x, y, face, scale, variation)end

---被贩卖单位
---被贩卖单位
---响应'出售单位'单位事件.

---@param undefined nothing
---@return unit
cj.GetSoldUnit = function(undefined)end

---改变${单位}的颜色值:(${Red},${Green},${Blue}),透明值:${Transparency}
---改变单位的颜色(RGB:0-255)[R]
---颜色格式为(红,绿,蓝).大多数单位使用(255,255,255)的颜色值和255的Alpha值.透明值为0是不可见的.颜色值和Alpha值取值范围为0-255.

---@param whichUnit unit
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetUnitVertexColor = function(whichUnit, red, green, blue, alpha)end


---@param lb leaderboard
---@param p player
---@return nothing
cj.LeaderboardRemovePlayerItem = function(lb, p)end

---被售出物品
---被售出物品
---响应'出售物品'或'抵押物品'单位事件.

---@param undefined nothing
---@return item
cj.GetSoldItem = function(undefined)end


---@param undefined nothing
---@return unit
cj.GetDetectedUnit = function(undefined)end


---@param undefined nothing
---@return real
cj.GetTimeOfDayScale = function(undefined)end


---@param whichCondition defeatcondition
---@return nothing
cj.DestroyDefeatCondition = function(whichCondition)end

---发布命令的单位
---发布命令的单位
---响应'发布命令'单位事件.

---@param undefined nothing
---@return unit
cj.GetOrderedUnit = function(undefined)end


---@param minu real
---@param minv real
---@param maxu real
---@param maxv real
---@return nothing
cj.SetCineFilterEndUV = function(minu, minv, maxu, maxv)end


---@param  string
---@return integer
cj.OrderId = function()end


---@param  string
---@return integer
cj.AbilityId = function()end


---@param abilityId integer
---@return string
cj.AbilityId2String = function(abilityId)end


---@param unitId integer
---@return string
cj.UnitId2String = function(unitId)end

---${单位}是${Type}
---单位类别检查

---@param whichUnit unit
---@param whichUnitType unittype
---@return boolean
cj.IsUnitType = function(whichUnit, whichUnitType)end

---${物体ID}的名称
---物体名称[C]
---如'A01Z',物体编辑器中物体的名字

---@param objectId integer
---@return string
cj.GetObjectName = function(objectId)end


---@param filename string
---@return nothing
cj.SetCineFilterTexture = function(filename)end


---@param whichTrigger trigger
---@param condition boolexpr
---@return triggercondition
cj.TriggerAddCondition = function(whichTrigger, condition)end

---召唤单位
---召唤单位
---响应'召唤单位'单位事件,指代被召唤单位.

---@param undefined nothing
---@return unit
cj.GetSummonedUnit = function(undefined)end


---@param undefined nothing
---@return integer
cj.GetIssuedOrderId = function(undefined)end


---@param cache gamecache
---@return nothing
cj.FlushGameCache = function(cache)end


---@param toPlayer player
---@return leaderboard
cj.PlayerGetLeaderboard = function(toPlayer)end

---新建特效${ModelFile}并绑定到${单位}的${AttachmentPoint}附加点上
---新建特效(创建到单位)[R]
---会创建特效.

---@param modelName string
---@param targetWidget widget
---@param attachPointName string
---@return effect
cj.AddSpecialEffectTarget = function(modelName, targetWidget, attachPointName)end


---@param saveFileName string
---@param doScoreScreen boolean
---@return nothing
cj.LoadGame = function(saveFileName, doScoreScreen)end

---${镜头}的${CameraField}
---镜头属性(指定镜头)[R]

---@param whichSetup camerasetup
---@param whichField camerafield
---@return real
cj.CameraSetupGetField = function(whichSetup, whichField)end

---命令发布点X坐标
---命令发布点X坐标[R]
---用坐标代替点可以省去创建、删除点的麻烦.

---@param undefined nothing
---@return real
cj.GetOrderPointX = function(undefined)end


---@param soundHandle sound
---@param killWhenDone boolean
---@param fadeOut boolean
---@return nothing
cj.StopSound = function(soundHandle, killWhenDone, fadeOut)end

---清空所有玩家的选择
---清空选择(所有玩家)
---使玩家取消选择所有已选单位.

---@param undefined nothing
---@return nothing
cj.ClearSelection = function(undefined)end

---${单位}提供的人口数量
---单位提供人口数量

---@param whichUnit unit
---@return integer
cj.GetUnitFoodMade = function(whichUnit)end

---新建的空排行榜
---新建排行榜[R]
---会创建排行榜.

---@param undefined nothing
---@return leaderboard
cj.CreateLeaderboard = function(undefined)end

---命令发布点Y坐标
---命令发布点Y坐标[R]
---用坐标代替点可以省去创建、删除点的麻烦.

---@param undefined nothing
---@return real
cj.GetOrderPointY = function(undefined)end

---命令发布点
---命令发布点
---响应'发布指定点目标命令'单位事件.会创建点.

---@param undefined nothing
---@return location
cj.GetOrderPointLoc = function(undefined)end


---@param whichPlayer player
---@param toWhichPlayers force
---@param flag boolean
---@return nothing
cj.CripplePlayer = function(whichPlayer, toWhichPlayers, flag)end

---${物品}的使用次数
---使用次数
---无限使用物品将返回0.

---@param whichItem item
---@return integer
cj.GetItemCharges = function(whichItem)end

---获取技能目标点的X坐标
---技能施放点X坐标
---这是1.24的函数，但已加入函数库，在1.20也可以使用。

---@param undefined nothing
---@return real
cj.GetSpellTargetX = function(undefined)end

---命令发布目标
---命令发布目标(可破坏物)
---响应'发布指定物体目标命令'单位事件并以可破坏物为目标时.

---@param undefined nothing
---@return destructable
cj.GetOrderTargetDestructable = function(undefined)end

---学习技能等级
---学习技能等级
---响应'学习技能'单位事件,指代被学习技能的等级.注意,该值为学习后的等级.

---@param undefined nothing
---@return integer
cj.GetLearnedSkillLevel = function(undefined)end

---命令发布目标
---命令发布目标
---响应'发布指定物体目标命令'单位事件并以物品为目标时.

---@param undefined nothing
---@return item
cj.GetOrderTargetItem = function(undefined)end

---命令发布目标
---命令发布目标
---响应'发布指定物体目标命令'单位事件并以单位为目标时.

---@param undefined nothing
---@return unit
cj.GetOrderTargetUnit = function(undefined)end


---@param undefined nothing
---@return nothing
cj.ForceCampaignSelectScreen = function(undefined)end


---@param soundHandle sound
---@return integer
cj.GetSoundDuration = function(soundHandle)end

---为${单位组}删除${单位}
---移除单位[R]
---并不影响单位本身.

---@param whichGroup group
---@param whichUnit unit
---@return nothing
cj.GroupRemoveUnit = function(whichGroup, whichUnit)end

---施法单位
---施法单位
---响应'施放技能'单位事件.

---@param undefined nothing
---@return unit
cj.GetSpellAbilityUnit = function(undefined)end

---设置${单位}的营救范围为${Range}
---设置营救范围

---@param whichUnit unit
---@param range real
---@return nothing
cj.SetUnitRescueRange = function(whichUnit, range)end

---施放技能
---施放技能
---响应施放技能单位事件,指代被施放的技能.

---@param undefined nothing
---@return integer
cj.GetSpellAbilityId = function(undefined)end


---@param lb leaderboard
---@param whichItem integer
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.LeaderboardSetItemLabelColor = function(lb, whichItem, red, green, blue, alpha)end

---技能施放点
---技能施放点
---响应'技能施放'单位事件.注意技能施放结束将无法捕获该点.会创建点.

---@param undefined nothing
---@return location
cj.GetSpellTargetLoc = function(undefined)end

---获取技能目标点的Y坐标
---技能施放点Y坐标
---这是1.24的函数，但已加入函数库，在1.20也可以使用。

---@param undefined nothing
---@return real
cj.GetSpellTargetY = function(undefined)end


---@param whichForce force
---@param filter boolexpr
---@return nothing
cj.ForceEnumPlayers = function(whichForce, filter)end

---技能施放目标
---技能施放目标(可破坏物)
---响应'施放技能'单位事件并以可破坏物为目标时.注意:技能施放结束将无法捕获施放目标.

---@param undefined nothing
---@return destructable
cj.GetSpellTargetDestructable = function(undefined)end

---${触发}的条件成立
---触发条件成立

---@param whichTrigger trigger
---@return boolean
cj.TriggerEvaluate = function(whichTrigger)end

---技能施放目标
---技能施放目标
---响应施放技能单位事件并以物品为目标时.注意:技能施放结束将无法捕获施放目标.

---@param undefined nothing
---@return item
cj.GetSpellTargetItem = function(undefined)end

---技能施放目标
---技能施放目标
---响应'施放技能'单位事件并以单位为目标时.注意:技能施放结束将无法捕获施放目标.

---@param undefined nothing
---@return unit
cj.GetSpellTargetUnit = function(undefined)end

---命令${单位}建造${单位类型}在坐标:(${X},${Y})
---发布建造命令(指定坐标)[R]

---@param whichPeon unit
---@param unitId integer
---@param x real
---@param y real
---@return boolean
cj.IssueBuildOrderById = function(whichPeon, unitId, x, y)end

---升级的英雄
---升级的英雄
---响应'提升等级'单位事件.

---@param undefined nothing
---@return unit
cj.GetLevelingUnit = function(undefined)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.FlushStoredString = function(cache, missionKey, key)end

---${单位}所在X轴坐标
---单位所在X轴坐标[R]

---@param whichUnit unit
---@return real
cj.GetUnitX = function(whichUnit)end


---@param whichTrigger trigger
---@return nothing
cj.TriggerClearActions = function(whichTrigger)end

---学习技能的英雄
---学习技能的英雄
---响应'学习技能'单位事件.

---@param undefined nothing
---@return unit
cj.GetLearningUnit = function(undefined)end


---@param d destructable
---@param whichAnimation string
---@return nothing
cj.SetDestructableAnimation = function(d, whichAnimation)end

---可复活英雄
---可复活英雄
---响应'变为可复活的'单位事件.

---@param undefined nothing
---@return unit
cj.GetRevivableUnit = function(undefined)end

---复活${Destructible},设置生命值为${Value}并${Show/Hide}生长动画
---复活

---@param d destructable
---@param life real
---@param birth boolean
---@return nothing
cj.DestructableRestoreLife = function(d, life, birth)end


---@param lb leaderboard
---@return boolean
cj.IsLeaderboardDisplayed = function(lb)end


---@param whichSetup camerasetup
---@param whichField camerafield
---@param value real
---@param duration real
---@return nothing
cj.CameraSetupSetField = function(whichSetup, whichField, value, duration)end

---${单位}物品栏第${Index}格的物品
---单位持有物品
---第一个单位格的位置为0.

---@param whichUnit unit
---@param itemSlot integer
---@return item
cj.UnitItemInSlot = function(whichUnit, itemSlot)end

---触发单位
---触发单位

---@param undefined nothing
---@return unit
cj.GetTriggerUnit = function(undefined)end

---复活英雄
---复活英雄
---响应'开始/取消/完成复活'单位事件.

---@param undefined nothing
---@return unit
cj.GetRevivingUnit = function(undefined)end


---@param lb leaderboard
---@param p player
---@return integer
cj.LeaderboardGetPlayerIndex = function(lb, p)end

---设置${单位}的X坐标为${X}
---设置X坐标[R]
---注意如果坐标超出地图边界是会出错的.

---@param whichUnit unit
---@param newX real
---@return nothing
cj.SetUnitX = function(whichUnit, newX)end

---召唤者
---召唤者
---响应'召唤单位'单位事件.

---@param undefined nothing
---@return unit
cj.GetSummoningUnit = function(undefined)end


---@param undefined nothing
---@return unit
cj.GetTransportUnit = function(undefined)end


---@param undefined nothing
---@return unit
cj.GetLoadedUnit = function(undefined)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@param whichUnit unit
---@return boolean
cj.StoreUnit = function(cache, missionKey, key, whichUnit)end

---设置${Player}的生命障碍为正常的${Percent}倍
---设置生命上限[R]
---生命上限影响玩家拥有单位的生命最大值.生命之书并不受生命上限限制,所以对英雄血量可能会有偏差.

---@param whichPlayer player
---@param handicap real
---@return nothing
cj.SetPlayerHandicap = function(whichPlayer, handicap)end

---设置${单位}的${属性}为${Value}
---设置单位属性[R]

---@param whichUnit unit
---@param whichUnitState unitstate
---@param newVal real
---@return nothing
cj.SetUnitState = function(whichUnit, whichUnitState, newVal)end

---保存游戏进度为:${Filename}
---保存进度[R]

---@param saveFileName string
---@return nothing
cj.SaveGame = function(saveFileName)end

---为${单位组}添加以(${坐标X},${坐标Y})为圆心，${半径}为半径的圆范围内，满足${条件}的单位。无效项(${N})
---选取单位添加到单位组(坐标)(不建议使用)
---最后一项是无效项，建议用上一个UI

---@param whichGroup group
---@param x real
---@param y real
---@param radius real
---@param filter boolexpr
---@param countLimit integer
---@return nothing
cj.GroupEnumUnitsInRangeCounted = function(whichGroup, x, y, radius, filter, countLimit)end

---操作物品的单位
---操作物品的单位
---响应'使用/获得/丢失物品'单位事件.

---@param undefined nothing
---@return unit
cj.GetManipulatingUnit = function(undefined)end

---被操作物品
---被操作物品
---响应'使用/得到/丢弃物品'单位事件.

---@param undefined nothing
---@return item
cj.GetManipulatedItem = function(undefined)end


---@param undefined nothing
---@return nothing
cj.ReloadGame = function(undefined)end

---${Player}更改${AllianceType}设置
---联盟状态更改(指定项目)
---当改变项目为【共享单位】时，(触发玩家)会不生效，此时不建议使用【任意玩家】事件。

---@param whichTrigger trigger
---@param whichPlayer player
---@param whichAlliance alliancetype
---@return event
cj.TriggerRegisterPlayerAllianceChange = function(whichTrigger, whichPlayer, whichAlliance)end

---${玩家}输入${Text},信息过滤方式${MatchType}
---输入聊天信息
---事件ID是(096)

---@param whichTrigger trigger
---@param whichPlayer player
---@param chatMessageToDetect string
---@param exactMatchOnly boolean
---@return event
cj.TriggerRegisterPlayerChatEvent = function(whichTrigger, whichPlayer, chatMessageToDetect, exactMatchOnly)end

---匹配的聊天信息
---匹配的聊天信息

---@param undefined nothing
---@return string
cj.GetEventPlayerChatStringMatched = function(undefined)end

---${可破坏物}死亡
---可破坏物死亡
---使用'事件响应-死亡的可破坏物'来获取死亡物体.

---@param whichTrigger trigger
---@param whichWidget widget
---@return event
cj.TriggerRegisterDeathEvent = function(whichTrigger, whichWidget)end

---坐标(${X},${Y})处的地形
---指定坐标地形[R]

---@param x real
---@param y real
---@return integer
cj.GetTerrainType = function(x, y)end


---@param whichUnit unit
---@param itemSlot integer
---@return item
cj.UnitRemoveItemFromSlot = function(whichUnit, itemSlot)end

---当前镜头源Z坐标
---当前镜头源Z坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraEyePositionZ = function(undefined)end

---${指定单位}${事件}
---指定单位事件

---@param whichTrigger trigger
---@param whichUnit unit
---@param whichEvent unitevent
---@return event
cj.TriggerRegisterUnitEvent = function(whichTrigger, whichUnit, whichEvent)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.SyncStoredReal = function(cache, missionKey, key)end

---伤害来源
---伤害来源
---响应'受到伤害'单位事件.

---@param undefined nothing
---@return unit
cj.GetEventDamageSource = function(undefined)end

---${可破坏物}所在X轴坐标
---可破坏物所在X轴坐标[R]

---@param d destructable
---@return real
cj.GetDestructableX = function(d)end


---@param undefined nothing
---@return player
cj.GetEventDetectingPlayer = function(undefined)end

---关闭游戏录像功能
---关闭游戏录像功能[R]
---游戏结束时不保存游戏录像.

---@param undefined nothing
---@return nothing
cj.DoNotSaveReplay = function(undefined)end

---${Hero}拥有${物品}
---持有物品

---@param whichUnit unit
---@param whichItem item
---@return boolean
cj.UnitHasItem = function(whichUnit, whichItem)end

---设置${物品}的状态为:${Show/Hide}
---显示/隐藏[R]
---只对在地面的物品有效,不会影响在物品栏中的物品.单位通过触发得到一个隐藏物品时,会自动显示该物品.

---@param whichItem item
---@param show boolean
---@return nothing
cj.SetItemVisible = function(whichItem, show)end

---事件目标单位
---事件目标单位
---响应'注意到/获取攻击目标'单位事件,指代目标单位.

---@param undefined nothing
---@return unit
cj.GetEventTargetUnit = function(undefined)end


---@param campaignNumber integer
---@param available boolean
---@return nothing
cj.SetEdCinematicAvailable = function(campaignNumber, available)end

---单位进入${区域}并满足${条件}
---单位进入不规则区域(指定条件)[R]
---使用'事件响应-进入的单位'来响应进入该区域的单位.该事件需要在其他触发为其添加.

---@param whichTrigger trigger
---@param whichRegion region
---@param filter boolexpr
---@return event
cj.TriggerRegisterEnterRegion = function(whichTrigger, whichRegion, filter)end

---单位离开${区域}并满足${条件}
---单位离开不规则区域(指定条件)[R]
---使用'事件响应-离开的单位'来响应离开该区域的单位.该事件需要在其他触发为其添加.

---@param whichTrigger trigger
---@param whichRegion region
---@param filter boolexpr
---@return event
cj.TriggerRegisterLeaveRegion = function(whichTrigger, whichRegion, filter)end

---触发区域
---触发区域[R]
---响应单位进入/离开不规则区域事件.

---@param undefined nothing
---@return region
cj.GetTriggeringRegion = function(undefined)end

---进入的单位
---进入的单位
---响应'单位进入区域'单位事件.

---@param undefined nothing
---@return unit
cj.GetEnteringUnit = function(undefined)end

---离开的单位
---离开的单位
---响应'单位离开区域'单位事件.

---@param undefined nothing
---@return unit
cj.GetLeavingUnit = function(undefined)end

---新建的可追踪物,使用模型:${模型名字}所在位置:(${X轴},${Y轴})面向角度:${数值}度
---新建可追踪物[R]
---可用来响应鼠标的移动和点击.会创建可追踪物.

---@param trackableModelPath string
---@param x real
---@param y real
---@param facing real
---@return trackable
cj.CreateTrackable = function(trackableModelPath, x, y, facing)end


---@param whichTrigger trigger
---@param actionFunc code
---@return triggeraction
cj.TriggerAddAction = function(whichTrigger, actionFunc)end


---@param whichTrigger trigger
---@param whichAction triggeraction
---@return nothing
cj.TriggerRemoveAction = function(whichTrigger, whichAction)end

---等待${Time}秒
---等待(玩家时间)
---该延迟功能受真实时间的影响(也就是玩家机器上的时间).因此每个玩家所延迟的时间可能不一致.

---@param timeout real
---@return nothing
cj.TriggerSleepAction = function(timeout)end


---@param whichSetup camerasetup
---@param x real
---@param y real
---@param duration real
---@return nothing
cj.CameraSetupSetDestPosition = function(whichSetup, x, y, duration)end

---运行${触发}(无视条件)
---运行触发(无视条件)
---无视事件和条件,运行触发动作.

---@param whichTrigger trigger
---@return nothing
cj.TriggerExecute = function(whichTrigger)end


---@param whichUnit unit
---@return integer
cj.UnitInventorySize = function(whichUnit)end


---@param undefined nothing
---@return nothing
cj.TriggerSyncStart = function(undefined)end

---${英雄}的经验值
---英雄经验值

---@param whichHero unit
---@return integer
cj.GetHeroXP = function(whichHero)end

---选取${玩家组}内所有玩家${做动作}
---选取玩家组内玩家做动作
---玩家组动作中可使用'选取玩家'来获取对应的玩家.等待不能在组动作中运行.

---@param whichForce force
---@param callback code
---@return nothing
cj.ForForce = function(whichForce, callback)end


---@param undefined nothing
---@return nothing
cj.TriggerSyncReady = function(undefined)end


---@param undefined nothing
---@return widget
cj.GetTriggerWidget = function(undefined)end

---设置随机种子数为：${整数}
---设置随机种子
---设置游戏的随机种子，随机种子会影响随机整数，攻击骰子之类的随机数。

---@param seed integer
---@return nothing
cj.SetRandomSeed = function(seed)end


---@param undefined nothing
---@return destructable
cj.GetTriggerDestructable = function(undefined)end

---设置${Ubersplat}:${Enable/Disable}永久渲染状态
---设置永久渲染状态
---要显示地面纹理变化则必须开启该项.

---@param whichSplat ubersplat
---@param flag boolean
---@return nothing
cj.SetUbersplatRenderAlways = function(whichSplat, flag)end

---给予${单位}${物品类型}并放在物品栏#${数值}
---新建物品到指定物品栏[R]
---注意:物品栏编号从0-5,而不是1-6.该动作创建的物品不被'最后创建的物品'所记录.

---@param whichUnit unit
---@param itemId integer
---@param itemSlot integer
---@return boolean
cj.UnitAddItemToSlotById = function(whichUnit, itemId, itemSlot)end

---触发玩家
---触发玩家

---@param undefined nothing
---@return player
cj.GetTriggerPlayer = function(undefined)end

---当前触发
---当前触发
---当前所运行的触发器.

---@param undefined nothing
---@return trigger
cj.GetTriggeringTrigger = function(undefined)end

---命令${Hero}学习技能${Skill}
---学习技能
---只有当英雄有剩余技能点时有效.

---@param whichHero unit
---@param abilcode integer
---@return nothing
cj.SelectHeroSkill = function(whichHero, abilcode)end

---${Trigger}的触发条件判断次数
---触发条件判断次数

---@param whichTrigger trigger
---@return integer
cj.GetTriggerEvalCount = function(whichTrigger)end

---${英雄}的力量值(${Include/Exclude}加成)
---英雄力量[R]

---@param whichHero unit
---@param includeBonuses boolean
---@return integer
cj.GetHeroStr = function(whichHero, includeBonuses)end

---选取单位
---选取单位
---使用'选取单位做动作'时,指代相应的单位.

---@param undefined nothing
---@return unit
cj.GetEnumUnit = function(undefined)end

---设置${计时器窗口}的状态为${Show/Hide}
---显示/隐藏计时器窗口(所有玩家)[R]
---计时器窗口不能在地图初始化时显示.

---@param whichDialog timerdialog
---@param display boolean
---@return nothing
cj.TimerDialogDisplay = function(whichDialog, display)end

---${Enable/Disable}预选功能(${Enable/Disable}显示预选圈,生命槽,物体信息)
---允许/禁用预选

---@param state boolean
---@param ui boolean
---@return nothing
cj.EnablePreSelect = function(state, ui)end

---选取玩家
---选取玩家
---使用'选取玩家做动作'时,指代相应的玩家.

---@param undefined nothing
---@return player
cj.GetEnumPlayer = function(undefined)end

---匹配玩家
---匹配玩家
---在'选取玩家满足条件'之类功能的条件中,指代被判断玩家.

---@param undefined nothing
---@return player
cj.GetFilterPlayer = function(undefined)end

---${Quest}失败
---任务失败

---@param whichQuest quest
---@return boolean
cj.IsQuestFailed = function(whichQuest)end

---匹配的可破坏物
---匹配的可破坏物
---在'选取可破坏物满足条件'之类功能的条件中,指代被判断的可破坏物.

---@param undefined nothing
---@return destructable
cj.GetFilterDestructable = function(undefined)end

---选取的可破坏物
---选取的可破坏物
---使用'选取可破坏物做动作'时,指代相应的可破坏物.

---@param undefined nothing
---@return destructable
cj.GetEnumDestructable = function(undefined)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.HaveStoredBoolean = function(cache, missionKey, key)end

---匹配物品
---匹配物品
---在'选取物品满足条件'之类功能的条件中,指代被判断单位.

---@param undefined nothing
---@return item
cj.GetFilterItem = function(undefined)end


---@param whichForce force
---@param filter boolexpr
---@param countLimit integer
---@return nothing
cj.ForceEnumPlayersCounted = function(whichForce, filter, countLimit)end


---@param undefined nothing
---@return nothing
cj.SyncSelections = function(undefined)end

---选取物品
---选取物品
---使用'选取物品做动作'时,指代相应的物品.

---@param undefined nothing
---@return item
cj.GetEnumItem = function(undefined)end

---删除${单位组}
---删除单位组[R]

---@param whichGroup group
---@return nothing
cj.DestroyGroup = function(whichGroup)end

---${Player}是${Player}的敌人
---是玩家的敌人
---不包括中立状态.单向判断玩家A对玩家B敌对侵犯,即表示玩家A是玩家B的盟友.

---@param whichPlayer player
---@param otherPlayer player
---@return boolean
cj.IsPlayerEnemy = function(whichPlayer, otherPlayer)end

---添加${单位类型}到所有市场并设置库存量:${Count}最大库存量:${Max}
---添加单位(所有市场)
---影响所有拥有'出售单位'技能的单位.

---@param unitId integer
---@param currentStock integer
---@param stockMax integer
---@return nothing
cj.AddUnitToAllStock = function(unitId, currentStock, stockMax)end

---为${单位组}添加${单位}
---添加单位[R]
---并不影响单位本身.

---@param whichGroup group
---@param whichUnit unit
---@return nothing
cj.GroupAddUnit = function(whichGroup, whichUnit)end


---@param whichGroup group
---@param unitname string
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsOfType = function(whichGroup, unitname, filter)end


---@param whichGroup group
---@param unitname string
---@param filter boolexpr
---@param countLimit integer
---@return nothing
cj.GroupEnumUnitsOfTypeCounted = function(whichGroup, unitname, filter, countLimit)end

---当前镜头源Y坐标
---当前镜头源Y坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraEyePositionY = function(undefined)end


---@param soundHandle sound
---@param x real
---@param y real
---@param z real
---@return nothing
cj.SetSoundVelocity = function(soundHandle, x, y, z)end

---给予${单位}${物品}
---给予物品[R]

---@param whichUnit unit
---@param whichItem item
---@return boolean
cj.UnitAddItem = function(whichUnit, whichItem)end

---${单位}的${技能}技能等级
---单位技能等级[R]
---如果单位没有该技能,则返回0.

---@param whichUnit unit
---@param abilcode integer
---@return integer
cj.GetUnitAbilityLevel = function(whichUnit, abilcode)end


---@param whichGroup group
---@param r rect
---@param filter boolexpr
---@param countLimit integer
---@return nothing
cj.GroupEnumUnitsInRectCounted = function(whichGroup, r, filter, countLimit)end

---删除${物品类型}从所有市场
---删除物品(所有市场)
---影响所有拥有'出售物品'技能的单位.

---@param itemId integer
---@return nothing
cj.RemoveItemFromAllStock = function(itemId)end

---为${单位组}添加以${点}为圆心，${半径}为半径的圆范围内，满足${条件}的单位
---选取单位添加到单位组(点)

---@param whichGroup group
---@param whichLocation location
---@param radius real
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsInRangeOfLoc = function(whichGroup, whichLocation, radius, filter)end


---@param whichWidget widget
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.AddIndicator = function(whichWidget, red, green, blue, alpha)end


---@param undefined nothing
---@return nothing
cj.PreloadGenClear = function(undefined)end


---@param whichGroup group
---@param whichPlayer player
---@param filter boolexpr
---@return nothing
cj.GroupEnumUnitsSelected = function(whichGroup, whichPlayer, filter)end

---设置${物品}的使用次数为${Charges}
---设置物品使用次数
---设置为0可以使物品能无限次使用.

---@param whichItem item
---@param charges integer
---@return nothing
cj.SetItemCharges = function(whichItem, charges)end

---设置${单位}的面向角度为${Angle}度
---设置单位面向角度[R]
---面向角度采用角度制,0度为正东方向,90度为正北方向。速度等于单位的转身速度。

---@param whichUnit unit
---@param facingAngle real
---@return nothing
cj.SetUnitFacing = function(whichUnit, facingAngle)end

---对${单位组}发布${Order}
---发布命令(无目标)(ID)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order integer
---@return boolean
cj.GroupImmediateOrderById = function(whichGroup, order)end

---改变${TimerWindow}文字颜色为(${Red},${Green},${Blue})透明值为:${Transparency}
---改变计时器窗口文字颜色[R]
---颜色格式为(红,绿,蓝).Alpha通道值0为不可见.颜色值和透明值值取值范围为0-255.

---@param whichDialog timerdialog
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.TimerDialogSetTitleColor = function(whichDialog, red, green, blue, alpha)end

---对${单位组}发布${Order}命令,目标点:(${X},${Y})
---发布命令(指定坐标)(ID)
---最多只能对单位组中12个单位发布命令.

---@param whichGroup group
---@param order integer
---@param x real
---@param y real
---@return boolean
cj.GroupPointOrderById = function(whichGroup, order, x, y)end

---杀死${单位}
---杀死

---@param whichUnit unit
---@return nothing
cj.KillUnit = function(whichUnit)end


---@param whichGroup group
---@param callback code
---@return nothing
cj.ForGroup = function(whichGroup, callback)end

---新建的随机变形.中心坐标:(${X},${Y})半径:${Radius}最小高度变化:${Depth}最大高度变化:${Depth}持续时间:${Duration}毫秒,变化周期:${Duration}毫秒
---新建地形变化:随机[R]

---@param x real
---@param y real
---@param radius real
---@param minDelta real
---@param maxDelta real
---@param duration integer
---@param updateInterval integer
---@return terraindeformation
cj.TerrainDeformRandom = function(x, y, radius, minDelta, maxDelta, duration, updateInterval)end

---新建空玩家组
---新建玩家组[R]
---会创建玩家组.

---@param undefined nothing
---@return force
cj.CreateForce = function(undefined)end

---${玩家组}添加${玩家}
---添加玩家[R]
---并不影响玩家本身.

---@param whichForce force
---@param whichPlayer player
---@return nothing
cj.ForceAddPlayer = function(whichForce, whichPlayer)end

---从${玩家组}中移除${玩家}
---移除玩家[R]
---并不影响玩家本身.

---@param whichForce force
---@param whichPlayer player
---@return nothing
cj.ForceRemovePlayer = function(whichForce, whichPlayer)end


---@param whichWidget widget
---@param newLife real
---@return nothing
cj.SetWidgetLife = function(whichWidget, newLife)end


---@param whichWidget widget
---@return real
cj.GetWidgetX = function(whichWidget)end


---@param whichWidget widget
---@return real
cj.GetWidgetY = function(whichWidget)end

---${单位}的自定义值
---单位自定义值
---可使用'单位-设置自定义值'来设置该值.

---@param whichUnit unit
---@return integer
cj.GetUnitUserData = function(whichUnit)end


---@param objectid integer
---@param x real
---@param y real
---@param face real
---@param scale real
---@param variation integer
---@return destructable
cj.CreateDeadDestructable = function(objectid, x, y, face, scale, variation)end

---坐标(${X},${Y})处的${PathingType}通行状态为关闭
---地形通行状态关闭(指定坐标)[R]
---指定类型单位不能通行即通行状态为关闭.如该点不能造建筑就是'建造'通行状态为关闭.可使用'环境-设置地形通行状态'来改变通行状态.

---@param x real
---@param y real
---@param t pathingtype
---@return boolean
cj.IsTerrainPathable = function(x, y, t)end

---新建死亡的${可破坏物类型}在(${X},${Y},${Z\),面向角度:\}${Direction}尺寸缩放:${Scale}样式:${Variation}
---新建可破坏物(死亡的)[R]
---坐标为(X,Y,Z)格式.面向角度采用角度制,0度为正东方向,90度为正北方向.

---@param objectid integer
---@param x real
---@param y real
---@param z real
---@param face real
---@param scale real
---@param variation integer
---@return destructable
cj.CreateDeadDestructableZ = function(objectid, x, y, z, face, scale, variation)end


---@param d destructable
---@param flag boolean
---@return nothing
cj.SetDestructableInvulnerable = function(d, flag)end


---@param r rect
---@param filter boolexpr
---@param actionFunc code
---@return nothing
cj.EnumDestructablesInRect = function(r, filter, actionFunc)end


---@param level integer
---@return integer
cj.ChooseRandomCreep = function(level)end

---${可破坏物}的类型
---指定可破坏物的类型

---@param d destructable
---@return integer
cj.GetDestructableTypeId = function(d)end

---改变${可破坏物}的动画播放速度为正常的${Percent}倍
---改变可破坏物动画播放速度[R]
---设置1倍动画播放速度来恢复正常状态.

---@param d destructable
---@param speedFactor real
---@return nothing
cj.SetDestructableAnimationSpeed = function(d, speedFactor)end


---@param whichPlayer player
---@param unitname string
---@param x real
---@param y real
---@param face real
---@return unit
cj.CreateUnitByName = function(whichPlayer, unitname, x, y, face)end

---${单位}的当前飞行高度
---当前飞行高度
---飞行单位可以直接改变飞行高度.其他单位通过添加/删除替换为飞行单位的变身技能(如乌鸦形态)之后,也能改变飞行高度.

---@param whichUnit unit
---@return real
cj.GetUnitFlyHeight = function(whichUnit)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.HaveStoredReal = function(cache, missionKey, key)end

---${英雄}的智力值(${Include/Exclude}加成)
---英雄智力[R]

---@param whichHero unit
---@param includeBonuses boolean
---@return integer
cj.GetHeroInt = function(whichHero, includeBonuses)end

---为玩家${玩家}创建一个${单位}在${指定点}面向角度:${Face}度
---创建单位(指定点)[C]
---不能被'最后创建的单位'捕获之

---@param id player
---@param unitid integer
---@param whichLocation location
---@param face real
---@return unit
cj.CreateUnitAtLoc = function(id, unitid, whichLocation, face)end


---@param id player
---@param unitname string
---@param whichLocation location
---@param face real
---@return unit
cj.CreateUnitAtLocByName = function(id, unitname, whichLocation, face)end


---@param whichUnit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return nothing
cj.UnitRemoveBuffsEx = function(whichUnit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel)end

---${单位}的当前命令ID.
---当前命令ID

---@param whichUnit unit
---@return integer
cj.GetUnitCurrentOrder = function(whichUnit)end

---${单位}使用的人口数量
---单位使用人口数量

---@param whichUnit unit
---@return integer
cj.GetUnitFoodUsed = function(whichUnit)end

---使${单位}${Pause/Unpause}生命周期
---暂停/恢复生命周期[R]
---只有召唤单位有生命周期.

---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.UnitPauseTimedLife = function(whichUnit, flag)end

---设置${单位}:${Enable/Disable}其人口占用
---允许/禁止人口占用[R]

---@param whichUnit unit
---@param useFood boolean
---@return nothing
cj.SetUnitUseFood = function(whichUnit, useFood)end

---${单位}所在Y轴坐标
---单位所在Y轴坐标[R]

---@param whichUnit unit
---@return real
cj.GetUnitY = function(whichUnit)end

---${单位}的位置
---单位位置
---会创建点.

---@param whichUnit unit
---@return location
cj.GetUnitLoc = function(whichUnit)end

---当前镜头目标Y坐标
---当前镜头目标Y坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraTargetPositionY = function(undefined)end

---${单位}的集结点位置
---单位集结点
---如果单位没有设置集结点,则返回null.设置自己为集结点可取消集结点设置.会创建点.

---@param whichUnit unit
---@return location
cj.GetUnitRallyPoint = function(whichUnit)end

---${单位}的集结点目标
---单位集结点目标
---如果指定单位没有设置集结点到单位目标,则返回null.

---@param whichUnit unit
---@return unit
cj.GetUnitRallyUnit = function(whichUnit)end


---@param whichUnit unit
---@param itemId integer
---@return item
cj.UnitAddItemById = function(whichUnit, itemId)end

---${单位}的默认移动速度
---默认移动速度

---@param whichUnit unit
---@return real
cj.GetUnitDefaultMoveSpeed = function(whichUnit)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.FlushStoredReal = function(cache, missionKey, key)end

---${单位}的类型
---指定单位的类型

---@param whichUnit unit
---@return integer
cj.GetUnitTypeId = function(whichUnit)end

---从${GameCache}中读取布尔值,类别:${Category},名称:${文字}
---读取布尔值[R]
---如果该值不存在则返回false.

---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.GetStoredBoolean = function(cache, missionKey, key)end

---${单位}所属种族
---单位种族
---物体编辑器中设置的单位所属种族.

---@param whichUnit unit
---@return race
cj.GetUnitRace = function(whichUnit)end


---@param whichBolt lightning
---@param r real
---@param g real
---@param b real
---@param a real
---@return boolean
cj.SetLightningColor = function(whichBolt, r, g, b, a)end

---${单位}的名字
---单位名字

---@param whichUnit unit
---@return string
cj.GetUnitName = function(whichUnit)end

---${Quest}已激活
---任务激活

---@param whichQuest quest
---@return boolean
cj.IsQuestEnabled = function(whichQuest)end


---@param soundHandle sound
---@param soundLabel string
---@return nothing
cj.SetSoundParamsFromLabel = function(soundHandle, soundLabel)end

---${单位}的附加值
---单位附加值
---单位附加值不可改变.可以做一些特殊用途.比如TD地图中的建筑贩卖价格.

---@param whichUnit unit
---@return integer
cj.GetUnitPointValue = function(whichUnit)end

---设置${单位}的警戒点:${option}
---锁定指定单位的警戒点[R]
---锁定并防止AI脚本改动单位警戒点.

---@param whichUnit unit
---@param creepGuard boolean
---@return nothing
cj.SetUnitCreepGuard = function(whichUnit, creepGuard)end

---${Multiboard}的标题
---多面板标题

---@param lb multiboard
---@return string
cj.MultiboardGetTitleText = function(lb)end

---设置${Building}的建造进度条为${Progress}%
---设置建筑建造进度条
---只作用于正在建造的建筑.

---@param whichUnit unit
---@param constructionPercentage integer
---@return nothing
cj.UnitSetConstructionProgress = function(whichUnit, constructionPercentage)end

---${单位类型}的附加值
---单位附加值(指定单位类型)
---单位附加值不可改变.可以做一些特殊用途.比如TD地图中的建筑贩卖价格.

---@param unitType integer
---@return integer
cj.GetUnitPointValueByType = function(unitType)end


---@param whichUnit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return boolean
cj.UnitHasBuffsEx = function(whichUnit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel)end

---设置${单位}的Y坐标为${Y}
---设置Y坐标[R]
---注意如果坐标超出地图边界是会出错的.

---@param whichUnit unit
---@param newY real
---@return nothing
cj.SetUnitY = function(whichUnit, newY)end

---当前镜头源X坐标
---当前镜头源X坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraEyePositionX = function(undefined)end

---立即移动${单位}到(${X},${Y})
---移动单位(立即)(指定坐标)[R]

---@param whichUnit unit
---@param newX real
---@param newY real
---@return nothing
cj.SetUnitPosition = function(whichUnit, newX, newY)end

---设置玩家的镜头属性${Field}为${数值},持续${Time}秒
---设置镜头属性(所有玩家)(限时)[R]

---@param whichField camerafield
---@param value real
---@param duration real
---@return nothing
cj.SetCameraField = function(whichField, value, duration)end

---立即移动${单位}到${指定点}
---移动单位(立即)(指定点)

---@param whichUnit unit
---@param whichLocation location
---@return nothing
cj.SetUnitPositionLoc = function(whichUnit, whichLocation)end

---设置${单位}的面向角度为${Angle}度,使用时间${Time}秒
---设置单位面向角度(指定时间)
---面向角度采用角度制,0度为正东方向,90度为正北方向。不能超过单位的转身速度。

---@param whichUnit unit
---@param facingAngle real
---@param duration real
---@return nothing
cj.SetUnitFacingTimed = function(whichUnit, facingAngle, duration)end


---@param whichUnit unit
---@param newHeight real
---@param rate real
---@return nothing
cj.SetUnitFlyHeight = function(whichUnit, newHeight, rate)end

---${英雄}的英雄等级
---英雄等级

---@param whichHero unit
---@return integer
cj.GetHeroLevel = function(whichHero)end

---在${Hashtable}的主索引${Value}子索引${Value}内提取布尔
---<1.24>从哈希表提取布尔[C]
---如果不存在则返回False

---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
cj.LoadBoolean = function(table, parentKey, childKey)end


---@param mag real
---@param velocity real
---@return nothing
cj.CameraSetTargetNoise = function(mag, velocity)end

---设置${单位}的移动速度为${Speed}
---设置移动速度

---@param whichUnit unit
---@param newSpeed real
---@return nothing
cj.SetUnitMoveSpeed = function(whichUnit, newSpeed)end

---改变${单位}的转向角度为${数值}(弧度制)
---改变单位转向角度(弧度制)[R]
---设置单位转身时的转向角度.数值越大转向幅度越大.

---@param whichUnit unit
---@param newPropWindowAngle real
---@return nothing
cj.SetUnitPropWindow = function(whichUnit, newPropWindowAngle)end

---${物品}的X轴坐标
---物品的X轴坐标[R]

---@param i item
---@return real
cj.GetItemX = function(i)end


---@param whichUnit unit
---@param whichItem item
---@param target widget
---@return boolean
cj.UnitDropItemTarget = function(whichUnit, whichItem, target)end

---${单位}的默认转身速度
---默认转身速度
---转身速度表示单位改变面向方向时的速度.数值越小表示转身越慢.

---@param whichUnit unit
---@return real
cj.GetUnitDefaultTurnSpeed = function(whichUnit)end

---删除${单位}
---删除
---被删除的单位不会留下尸体.如果是英雄则不能再被复活.

---@param whichUnit unit
---@return nothing
cj.RemoveUnit = function(whichUnit)end


---@param whichUnit unit
---@return real
cj.GetUnitDefaultPropWindow = function(whichUnit)end

---改变${单位}所属为${Player}并${Change/RetainColor}
---改变所属

---@param whichUnit unit
---@param whichPlayer player
---@param changeColor boolean
---@return nothing
cj.SetUnitOwner = function(whichUnit, whichPlayer, changeColor)end


---@param whichUnit unit
---@param whichAnimation string
---@return nothing
cj.QueueUnitAnimation = function(whichUnit, whichAnimation)end

---播放${Unit}的${动画名}动作
---播放单位动画
---通过'重置单位动作'恢复到普通的动作.

---@param whichUnit unit
---@param whichAnimation string
---@return nothing
cj.SetUnitAnimation = function(whichUnit, whichAnimation)end

---${单位}处在${玩家}的真实视野范围内
---被检测到
---用来判断单位在这个玩家反隐形范围内，注：不包含该玩家同盟的反隐范围。

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitDetected = function(whichUnit, whichPlayer)end

---从${GameCache}中读取字符串,类别:${Category}名称:${文字}
---读取字符串[C]
---如果该值不存在,则返回空字符串.注意,空字符串不等于null

---@param cache gamecache
---@param missionKey string
---@param key string
---@return string
cj.GetStoredString = function(cache, missionKey, key)end

---给${单位}附加动作${Tag},状态为${Add/Remove}
---添加/删除单位动画附加名[R]
---比如恶魔猎手添加'alternate'会显示为恶魔形态;农民添加'gold'则为背负黄金形态.

---@param whichUnit unit
---@param animProperties string
---@param add boolean
---@return nothing
cj.AddUnitAnimationProperties = function(whichUnit, animProperties, add)end

---改变${单位}的动画播放速度为正常速度的${Percent}倍
---改变单位动画播放速度(按倍数)[R]
---设置1倍动画播放速度来恢复正常状态.

---@param whichUnit unit
---@param timeScale real
---@return nothing
cj.SetUnitTimeScale = function(whichUnit, timeScale)end


---@param whichSetup camerasetup
---@param zDestOffset real
---@param forceDuration real
---@return nothing
cj.CameraSetupApplyForceDurationWithZ = function(whichSetup, zDestOffset, forceDuration)end


---@param whichUnit unit
---@param blendTime real
---@return nothing
cj.SetUnitBlendTime = function(whichUnit, blendTime)end

---设置${单位}${On/Off}碰撞
---设置碰撞开关
---关闭碰撞的单位无视障碍物,但其他单位仍视其为障碍物.

---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.SetUnitPathing = function(whichUnit, flag)end

---重置${单位}的身体朝向
---重置身体朝向
---恢复单位的身体朝向为正常状态.

---@param whichUnit unit
---@return nothing
cj.ResetUnitLookAt = function(whichUnit)end


---@param whichUnit unit
---@param exploded boolean
---@return nothing
cj.SetUnitExploded = function(whichUnit, exploded)end

---${Player}是裁判或观察者
---玩家是裁判或观察者[R]

---@param whichPlayer player
---@return boolean
cj.IsPlayerObserver = function(whichPlayer)end

---设置${英雄}的敏捷为${Value},(${Permanent}永久奖励)
---设置英雄敏捷[R]
---永久奖励貌似无效项,不需要理会.

---@param whichHero unit
---@param newAgi integer
---@param permanent boolean
---@return nothing
cj.SetHeroAgi = function(whichHero, newAgi, permanent)end

---对${单位}发布${Order}命令到坐标:(${X},${Y})
---发布命令(指定坐标)(ID)

---@param whichUnit unit
---@param order integer
---@param x real
---@param y real
---@return boolean
cj.IssuePointOrderById = function(whichUnit, order, x, y)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.FlushStoredUnit = function(cache, missionKey, key)end

---设置${英雄}的智力为${Value},(${Permanent}永久奖励)
---设置英雄智力[R]
---永久奖励貌似无效项,不需要理会.

---@param whichHero unit
---@param newInt integer
---@param permanent boolean
---@return nothing
cj.SetHeroInt = function(whichHero, newInt, permanent)end

---降低${Hero}${Level}个等级
---降低等级[R]
---只能降低等级.英雄经验将重置为该等级的初始值.

---@param whichHero unit
---@param howManyLevels integer
---@return boolean
cj.UnitStripHeroLevel = function(whichHero, howManyLevels)end

---命令${单位}移动${物品}到物品栏#${Index}
---移动物品到物品栏[R]
---只有当单位持有该物品时才有效.注意:该函数中物品栏编号从0-5,而不是1-6.

---@param whichUnit unit
---@param whichItem item
---@param slot integer
---@return boolean
cj.UnitDropItemSlot = function(whichUnit, whichItem, slot)end


---@param waygate unit
---@return boolean
cj.WaygateIsActive = function(waygate)end

---增加${英雄}${Value}点剩余技能点
---添加剩余技能点[R]

---@param whichHero unit
---@param skillPointDelta integer
---@return boolean
cj.UnitModifySkillPoints = function(whichHero, skillPointDelta)end

---${Hero}的称谓
---英雄称谓
---如圣骑士会返回'无惧的布赞恩'而不是'圣骑士'.

---@param whichHero unit
---@return string
cj.GetHeroProperName = function(whichHero)end

---${Enable/Disable}${Hero}的经验获取
---允许/禁止经验获取[R]

---@param whichHero unit
---@param flag boolean
---@return nothing
cj.SuspendHeroXP = function(whichHero, flag)end


---@param undefined nothing
---@return real
cj.GetCameraBoundMinY = function(undefined)end

---重置${单位}的所有技能冷却时间
---重置技能CD
---如果要重置单一技能的CD,可以通过删除技能+添加技能+设置技能等级来完成.

---@param whichUnit unit
---@return nothing
cj.UnitResetCooldown = function(whichUnit)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.FlushStoredInteger = function(cache, missionKey, key)end

---命令${单位}使用${物品},目标:${单位}
---使用物品(对单位)

---@param whichUnit unit
---@param whichItem item
---@param target widget
---@return boolean
cj.UnitUseItemTarget = function(whichUnit, whichItem, target)end

---立即复活${英雄}在(${X},${Y}),${Show/Hide}复活动画
---立即复活(指定坐标)[R]
---如果英雄正在祭坛复活,则会退回部分花费(默认为100%).

---@param whichHero unit
---@param x real
---@param y real
---@param doEyecandy boolean
---@return boolean
cj.ReviveHero = function(whichHero, x, y, doEyecandy)end

---立即复活${英雄}在${指定点},${Show/Hide}复活动画
---立即复活(指定点)
---如果英雄正在祭坛复活,则会退回部分花费(默认为100%).

---@param whichHero unit
---@param loc location
---@param doEyecandy boolean
---@return boolean
cj.ReviveHeroLoc = function(whichHero, loc, doEyecandy)end

---设置${单位}${Invulnerable/Vulnerable}
---设置无敌/可攻击

---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.SetUnitInvulnerable = function(whichUnit, flag)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.SyncStoredUnit = function(cache, missionKey, key)end

---设置${单位}${Pause/Unpause}
---暂停/恢复[R]

---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.PauseUnit = function(whichUnit, flag)end


---@param whichUnit unit
---@param amount integer
---@return nothing
cj.AddResourceAmount = function(whichUnit, amount)end

---新建的空物品池
---新建物品池[R]
---会创建物品池.

---@param undefined nothing
---@return itempool
cj.CreateItemPool = function(undefined)end

---${金矿}的储金量
---储金量
---只对金矿有效.

---@param whichUnit unit
---@return integer
cj.GetResourceAmount = function(whichUnit)end


---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
cj.HaveSavedString = function(table, parentKey, childKey)end


---@param whichUnit unit
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.UnitAddIndicator = function(whichUnit, red, green, blue, alpha)end

---${单位}属于${玩家组}里的玩家
---是玩家组里玩家的单位
---判断单位是否属于这个玩家组里的玩家。

---@param whichUnit unit
---@param whichForce force
---@return boolean
cj.IsUnitInForce = function(whichUnit, whichForce)end

---${单位}属于${Player}
---是玩家的单位
---判断单位是否属于这个玩家。

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitOwnedByPlayer = function(whichUnit, whichPlayer)end

---${单位}是${Player}的同盟单位
---是玩家的同盟单位
---包括中立状态.单向判断玩家对单位是否为不侵犯状态.

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitAlly = function(whichUnit, whichPlayer)end

---${单位}是${Player}的敌对单位
---是玩家的敌对单位
---不包括中立状态.单向判断玩家对单位是否为敌对侵犯.

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitEnemy = function(whichUnit, whichPlayer)end

---${单位}对${Player}可见
---单位可见

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitVisible = function(whichUnit, whichPlayer)end

---${单位}对${Player}不可见
---单位不可见

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitInvisible = function(whichUnit, whichPlayer)end

---${Multiboard}的列数
---列数

---@param lb multiboard
---@return integer
cj.MultiboardGetColumnCount = function(lb)end

---${单位}在${Player}的迷雾范围内
---单位在迷雾中
---黑色阴影内的单位不被计算在内.

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitFogged = function(whichUnit, whichPlayer)end

---${单位}在${Player}的黑色阴影内
---单位在黑色阴影中

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitMasked = function(whichUnit, whichPlayer)end

---${单位}被${Player}选择
---被玩家选择

---@param whichUnit unit
---@param whichPlayer player
---@return boolean
cj.IsUnitSelected = function(whichUnit, whichPlayer)end


---@param lb leaderboard
---@param p player
---@return boolean
cj.LeaderboardHasPlayerItem = function(lb, p)end

---${单位}是${Race}
---单位种族检查

---@param whichUnit unit
---@param whichRace race
---@return boolean
cj.IsUnitRace = function(whichUnit, whichRace)end

---${单位}在距离${指定点}${范围}范围内
---在指定点范围内[R]

---@param whichUnit unit
---@param whichLocation location
---@param distance real
---@return boolean
cj.IsUnitInRangeLoc = function(whichUnit, whichLocation, distance)end


---@param whichUnit unit
---@param whichTransport unit
---@return boolean
cj.IsUnitInTransport = function(whichUnit, whichTransport)end

---${单位类型}是${Type}
---单位类别检查(指定单位类型)

---@param unitId integer
---@param whichUnitType unittype
---@return boolean
cj.IsUnitIdType = function(unitId, whichUnitType)end

---${单位}的所有者
---单位所有者

---@param whichUnit unit
---@return player
cj.GetOwningPlayer = function(whichUnit)end

---设置${单位}的视野对${Player}${on/off}
---共享视野[R]

---@param whichUnit unit
---@param whichPlayer player
---@param share boolean
---@return nothing
cj.UnitShareVision = function(whichUnit, whichPlayer, share)end

---设置${单位}的尸体腐烂状态:${Suspend/Resume}
---暂停尸体腐烂[R]
---只对已完成死亡动作的尸体有效.

---@param whichUnit unit
---@param suspend boolean
---@return nothing
cj.UnitSuspendDecay = function(whichUnit, suspend)end

---在${单位池}中添加一个${单位}比重为${数值}
---添加单位类型[R]
---比重越高被选择的机率越大

---@param whichPool unitpool
---@param unitId integer
---@param weight real
---@return nothing
cj.UnitPoolAddUnitType = function(whichPool, unitId, weight)end

---为${单位}添加${Classification}类别
---添加类别[R]
---已去除所有无效类别.

---@param whichUnit unit
---@param whichUnitType unittype
---@return boolean
cj.UnitAddType = function(whichUnit, whichUnitType)end

---玩家开启作弊模式:无法胜利
---无法胜利[R]
---单机作弊码开启的模式.

---@param undefined nothing
---@return boolean
cj.IsNoVictoryCheat = function(undefined)end

---为${单位}删除${Classification}类别
---删除类别[R]
---已去除所有无效类别.

---@param whichUnit unit
---@param whichUnitType unittype
---@return boolean
cj.UnitRemoveType = function(whichUnit, whichUnitType)end

---为${单位}添加${技能}
---添加技能[R]

---@param whichUnit unit
---@param abilityId integer
---@return boolean
cj.UnitAddAbility = function(whichUnit, abilityId)end


---@param whichQuestItem questitem
---@param description string
---@return nothing
cj.QuestItemSetDescription = function(whichQuestItem, description)end

---为${单位}删除${技能}
---删除技能[R]

---@param whichUnit unit
---@param abilityId integer
---@return boolean
cj.UnitRemoveAbility = function(whichUnit, abilityId)end

---为${Player}在圆心为(${X},${Y}),半径为${R}的圆范围内${Create/Remove}一块荒芜地表
---创建/删除荒芜地表(圆范围)(指定坐标)[R]

---@param whichPlayer player
---@param x real
---@param y real
---@param radius real
---@param addBlight boolean
---@return nothing
cj.SetBlight = function(whichPlayer, x, y, radius, addBlight)end

---${单位}的附带Buff数量,(${Include/Exclude}正面Buff,${Include/Exclude}负面Buff${Include/Exclude}魔法Buff,${Include/Exclude}物理Buff${Include/Exclude}生命周期,${Include/Exclude}光环效果${Include/Exclude}不可驱散Buff)
---拥有Buff数量[R]

---@param whichUnit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return integer
cj.UnitCountBuffsEx = function(whichUnit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel)end

---设置${Player}使用${排行榜}
---设置玩家使用的排行榜[R]
---每个玩家只能显示一个排行榜.

---@param toPlayer player
---@param lb leaderboard
---@return nothing
cj.PlayerSetLeaderboard = function(toPlayer, lb)end


---@param whichUnit unit
---@param removePositive boolean
---@param removeNegative boolean
---@return nothing
cj.UnitRemoveBuffs = function(whichUnit, removePositive, removeNegative)end


---@param whichUnit unit
---@param add boolean
---@return nothing
cj.UnitAddSleep = function(whichUnit, add)end


---@param whichUnit unit
---@return boolean
cj.UnitCanSleep = function(whichUnit)end

---使${单位}${Sleep/RemainAwake}
---控制单位睡眠状态
---使用该功能前必须用触发为单位添加'一直睡眠'技能.

---@param whichUnit unit
---@param add boolean
---@return nothing
cj.UnitAddSleepPerm = function(whichUnit, add)end

---为玩家保留${Number}个左上角英雄图标.
---保留英雄图标
---因为共享单位而被控制的其他玩家英雄的图标将在保留位置之后开始显示.

---@param reserved integer
---@return nothing
cj.SetReservedLocalHeroButtons = function(reserved)end


---@param whichUnit unit
---@return boolean
cj.UnitCanSleepPerm = function(whichUnit)end


---@param whichUnit unit
---@return boolean
cj.UnitIsSleeping = function(whichUnit)end


---@param whichUnit unit
---@return nothing
cj.UnitWakeUp = function(whichUnit)end

---为${单位}设置${BuffType}类型的生命周期,持续时间为${Duration}秒
---设置生命周期[R]

---@param whichUnit unit
---@param buffId integer
---@param duration real
---@return nothing
cj.UnitApplyTimedLife = function(whichUnit, buffId, duration)end


---@param whichUnit unit
---@param flag boolean
---@return boolean
cj.UnitIgnoreAlarm = function(whichUnit, flag)end

---为${计时器}新建计时窗口
---新建计时器窗口[R]
---为一个计时器创建一个新建计时器窗口.

---@param t timer
---@return timerdialog
cj.CreateTimerDialog = function(t)end

---当前镜头目标X坐标
---当前镜头目标X坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraTargetPositionX = function(undefined)end


---@param whichUnit unit
---@return boolean
cj.UnitIgnoreAlarmToggled = function(whichUnit)end

---设置${Image}:${Enable/Disable}显示状态
---设置图像渲染状态
---未发现有任何作用.

---@param whichImage image
---@param flag boolean
---@return nothing
cj.SetImageRender = function(whichImage, flag)end


---@param lb leaderboard
---@param whichItem integer
---@param val integer
---@return nothing
cj.LeaderboardSetItemValue = function(lb, whichItem, val)end

---命令${单位}在${Seconds}秒后对半径为${Size}圆心为(${X},${Y})的范围造成${Amount}点伤害(${是}攻击伤害,${是}远程攻击)攻击类型:${AttackType}伤害类型:${DamageType}装甲类型:${WeaponType}
---伤害区域[R]
---该动作不会打断单位动作.由该动作伤害/杀死单位同样正常触发'受到伤害'和'死亡'单位事件.

---@param whichUnit unit
---@param delay real
---@param radius real
---@param x real
---@param y real
---@param amount real
---@param attack boolean
---@param ranged boolean
---@param attackType attacktype
---@param damageType damagetype
---@param weaponType weapontype
---@return boolean
cj.UnitDamagePoint = function(whichUnit, delay, radius, x, y, amount, attack, ranged, attackType, damageType, weaponType)end

---命令${单位}对${Target}造成${Amount}点伤害(${是}攻击伤害,${是}远程攻击)攻击类型:${AttackType}伤害类型:${DamageType}武器类型:${WeaponType}
---伤害目标[R]
---该动作不会打断单位动作.由该动作伤害/杀死单位同样正常触发'受到伤害'和'死亡'单位事件.

---@param whichUnit unit
---@param target widget
---@param amount real
---@param attack boolean
---@param ranged boolean
---@param attackType attacktype
---@param damageType damagetype
---@param weaponType weapontype
---@return boolean
cj.UnitDamageTarget = function(whichUnit, target, amount, attack, ranged, attackType, damageType, weaponType)end

---使${单位}的${技能}等级提升1级
---提升技能等级[R]
---改变死亡单位的光环技能会导致魔兽崩溃.

---@param whichUnit unit
---@param abilcode integer
---@return integer
cj.IncUnitAbilityLevel = function(whichUnit, abilcode)end

---设置${单位}的${技能}等级为${Level}
---设置技能等级[R]
---改变死亡单位的光环技能会导致魔兽崩溃.

---@param whichUnit unit
---@param abilcode integer
---@param level integer
---@return integer
cj.SetUnitAbilityLevel = function(whichUnit, abilcode, level)end

---设置${Building}的升级进度条为${Progress}%
---设置建筑升级进度条
---只作用于正在升级的建筑.是建筑A升级为建筑B的升级,不是科技的研究.

---@param whichUnit unit
---@param upgradePercentage integer
---@return nothing
cj.UnitSetUpgradeProgress = function(whichUnit, upgradePercentage)end


---@param level integer
---@return integer
cj.ChooseRandomItem = function(level)end


---@param whichUnit unit
---@param flag boolean
---@return nothing
cj.UnitSetUsesAltIcon = function(whichUnit, flag)end

---对${单位}发布${Order}命令
---发布命令(无目标)(ID)

---@param whichUnit unit
---@param order integer
---@return boolean
cj.IssueImmediateOrderById = function(whichUnit, order)end

---对${单位}发布${Order}命令到目标:${单位}
---发布命令(指定单位)(ID)

---@param whichUnit unit
---@param order integer
---@param targetWidget widget
---@return boolean
cj.IssueTargetOrderById = function(whichUnit, order, targetWidget)end

---使${玩家}对${单位}发布${Order}命令到坐标:(${X},${Y})
---发布中介命令(指定坐标)(ID)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@param x real
---@param y real
---@return boolean
cj.IssueNeutralPointOrderById = function(forWhichPlayer, neutralStructure, unitId, x, y)end

---使${玩家}对${单位}发布${Order}命令到目标:${单位}
---发布中介命令(指定单位)(ID)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@param target widget
---@return boolean
cj.IssueNeutralTargetOrderById = function(forWhichPlayer, neutralStructure, unitId, target)end


---@param waygate unit
---@param activate boolean
---@return nothing
cj.WaygateActivate = function(waygate, activate)end

---对${单位}发布${Order}命令
---发布命令(无目标)

---@param whichUnit unit
---@param order string
---@return boolean
cj.IssueImmediateOrder = function(whichUnit, order)end

---对${单位}发布${Order}命令到坐标:(${X},${Y})
---发布命令(指定坐标)

---@param whichUnit unit
---@param order string
---@param x real
---@param y real
---@return boolean
cj.IssuePointOrder = function(whichUnit, order, x, y)end

---对${单位}发布${Order}命令到目标:${单位}
---发布命令(指定单位)

---@param whichUnit unit
---@param order string
---@param targetWidget widget
---@return boolean
cj.IssueTargetOrder = function(whichUnit, order, targetWidget)end


---@param whichQuestItem questitem
---@param completed boolean
---@return nothing
cj.QuestItemSetCompleted = function(whichQuestItem, completed)end


---@param whichUnit unit
---@param order string
---@param x real
---@param y real
---@param instantTargetWidget widget
---@return boolean
cj.IssueInstantPointOrder = function(whichUnit, order, x, y, instantTargetWidget)end


---@param whichPeon unit
---@param unitToBuild string
---@param x real
---@param y real
---@return boolean
cj.IssueBuildOrder = function(whichPeon, unitToBuild, x, y)end


---@param t texttag
---@param whichUnit unit
---@param heightOffset real
---@return nothing
cj.SetTextTagPosUnit = function(t, whichUnit, heightOffset)end

---使${玩家}对${单位}发布${Order}命令
---发布中介命令(无目标)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@return boolean
cj.IssueNeutralImmediateOrder = function(forWhichPlayer, neutralStructure, unitToBuild)end

---使${玩家}对${单位}发布${Order}命令到坐标:(${X},${Y})
---发布中介命令(指定坐标)
---可以用来对非本玩家单位发布命令.

---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@param x real
---@param y real
---@return boolean
cj.IssueNeutralPointOrder = function(forWhichPlayer, neutralStructure, unitToBuild, x, y)end

---${传送门}的目的地X坐标
---传送门目的地X坐标

---@param waygate unit
---@return real
cj.WaygateGetDestinationX = function(waygate)end

---增加${玩家}的${科技}科技${整数}级
---增加科技等级
---科技等级不能倒退。

---@param whichPlayer player
---@param techid integer
---@param levels integer
---@return nothing
cj.AddPlayerTechResearched = function(whichPlayer, techid, levels)end

---${传送门}的目的地Y坐标
---传送门目的地Y坐标

---@param waygate unit
---@return real
cj.WaygateGetDestinationY = function(waygate)end

---添加${物品类型}到所有市场并设置库存量:${Count}最大库存量:${Max}
---添加物品(所有市场)
---影响所有拥有'出售物品'技能的单位.

---@param itemId integer
---@param currentStock integer
---@param stockMax integer
---@return nothing
cj.AddItemToAllStock = function(itemId, currentStock, stockMax)end


---@param whichUnit unit
---@param itemId integer
---@param currentStock integer
---@param stockMax integer
---@return nothing
cj.AddItemToStock = function(whichUnit, itemId, currentStock, stockMax)end


---@param whichUnit unit
---@param unitId integer
---@param currentStock integer
---@param stockMax integer
---@return nothing
cj.AddUnitToStock = function(whichUnit, unitId, currentStock, stockMax)end


---@param whichUnit unit
---@param itemId integer
---@return nothing
cj.RemoveItemFromStock = function(whichUnit, itemId)end


---@param whichPlayer player
---@param techid integer
---@return integer
cj.GetPlayerTechMaxAllowed = function(whichPlayer, techid)end

---删除${单位类型}从所有市场
---删除单位(所有市场)
---影响所有拥有'出售单位'技能的单位.

---@param unitId integer
---@return nothing
cj.RemoveUnitFromAllStock = function(unitId)end


---@param musicFileName string
---@return nothing
cj.PlayThematicMusic = function(musicFileName)end


---@param whichUnit unit
---@param unitId integer
---@return nothing
cj.RemoveUnitFromStock = function(whichUnit, unitId)end

---限制所有市场的可出售单位种类数为${Quantity}
---限制单位种类(所有市场)
---影响所有拥有'出售单位'技能的单位.

---@param slots integer
---@return nothing
cj.SetAllUnitTypeSlots = function(slots)end

---限制${Marketplace}的可出售物品种类数为${Quantity}
---限制物品种类(指定市场)
---只影响有'出售物品'技能的单位.

---@param whichUnit unit
---@param slots integer
---@return nothing
cj.SetItemTypeSlots = function(whichUnit, slots)end

---限制${Marketplace}的可出售单位种类数为${Quantity}
---限制单位种类(指定市场)
---只影响有'出售单位'技能的单位.

---@param whichUnit unit
---@param slots integer
---@return nothing
cj.SetUnitTypeSlots = function(whichUnit, slots)end

---设置${单位}的自定义值为${Index}
---设置自定义值
---单位自定义值仅用于触发器.可用来给单位绑定一个整型数据.

---@param whichUnit unit
---@param data integer
---@return nothing
cj.SetUnitUserData = function(whichUnit, data)end

---新建${物品}在(${X},${Y})
---创建

---@param itemid integer
---@param x real
---@param y real
---@return item
cj.CreateItem = function(itemid, x, y)end

---删除${物品}
---删除

---@param whichItem item
---@return nothing
cj.RemoveItem = function(whichItem)end

---切换到关卡:${Filename}(${Show/Skip}计分屏)
---切换关卡[R]

---@param newLevel string
---@param doScoreScreen boolean
---@return nothing
cj.ChangeLevel = function(newLevel, doScoreScreen)end

---${物品}的所属玩家
---物品所属玩家
---与持有者无关,默认为中立被动玩家.

---@param whichItem item
---@return player
cj.GetItemPlayer = function(whichItem)end

---${物品}的类型
---指定物品的类型

---@param i item
---@return integer
cj.GetItemTypeId = function(i)end

---${物品}的Y轴坐标
---物品的Y轴坐标[R]

---@param i item
---@return real
cj.GetItemY = function(i)end


---@param musicName string
---@return nothing
cj.PlayMusic = function(musicName)end


---@param whichItem item
---@param flag boolean
---@return nothing
cj.SetItemDropOnDeath = function(whichItem, flag)end

---设置${物品}${Pawnable/Unpawnable}
---设置物品可否抵押
---不可抵押物品不能被卖到商店.

---@param i item
---@param flag boolean
---@return nothing
cj.SetItemPawnable = function(i, flag)end

---${物品}是无敌的
---物品无敌

---@param whichItem item
---@return boolean
cj.IsItemInvulnerable = function(whichItem)end

---锁定玩家镜头到${单位},偏移坐标(${X},${Y})
---锁定镜头到单位(固定镜头源)(所有玩家)[R]
---偏移坐标(X,Y)以单位脚底为原点坐标.

---@param whichUnit unit
---@param xoffset real
---@param yoffset real
---@return nothing
cj.SetCameraOrientController = function(whichUnit, xoffset, yoffset)end

---对所有玩家发送小地图信号到坐标(${X},${Y})持续时间:${Duration}秒
---小地图信号(所有玩家)[R]

---@param x real
---@param y real
---@param duration real
---@return nothing
cj.PingMinimap = function(x, y, duration)end

---${物品}的分类
---指定物品的分类

---@param whichItem item
---@return itemtype
cj.GetItemType = function(whichItem)end

---${物品}是可见的
---物品可见[R]
---物品不被隐藏且不被单位持有时即为可见的.

---@param whichItem item
---@return boolean
cj.IsItemVisible = function(whichItem)end


---@param r rect
---@param filter boolexpr
---@param actionFunc code
---@return nothing
cj.EnumItemsInRect = function(r, filter, actionFunc)end

---${物品}是拾取时自动使用类物品
---物品是拾取时自动使用的[R]

---@param whichItem item
---@return boolean
cj.IsItemPowerup = function(whichItem)end

---${物品}可被市场随机出售
---物品可被市场随机出售[R]

---@param whichItem item
---@return boolean
cj.IsItemSellable = function(whichItem)end

---改变${TimerWindow}的计间颜色为(${Red},${Green},${Blue})透明值为:${Transparency}
---改变计时器窗口计时颜色[R]
---颜色格式为(红,绿,蓝).Alpha通道值0为不可见.颜色值和透明值值取值范围为0-255.

---@param whichDialog timerdialog
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.TimerDialogSetTimeColor = function(whichDialog, red, green, blue, alpha)end

---忽视${单位}的警戒点
---忽视指定单位的警戒点
---单位将不会自动返回原警戒点.一个很有用的功能就是刷怪进攻时忽视单位警戒范围的话,怪就不会想家了.

---@param hUnit unit
---@return nothing
cj.RemoveGuardPosition = function(hUnit)end


---@param itemId integer
---@return boolean
cj.IsItemIdPowerup = function(itemId)end


---@param itemId integer
---@return boolean
cj.IsItemIdSellable = function(itemId)end


---@param itemId integer
---@return boolean
cj.IsItemIdPawnable = function(itemId)end

---${物品}的名字
---物品名字

---@param whichItem item
---@return string
cj.GetItemName = function(whichItem)end


---@param lb leaderboard
---@param whichItem integer
---@param val string
---@return nothing
cj.LeaderboardSetItemLabel = function(lb, whichItem, val)end

---${物品}的自定义值
---物品自定义值
---可以使用'物品-设置自定义值'来设置该值.

---@param whichItem item
---@return integer
cj.GetItemUserData = function(whichItem)end


---@param number integer
---@return player
cj.Player = function(number)end

---${Player}是${Player}的盟友
---是玩家的盟友
---包括中立状态.单向判断玩家A对玩家B联盟不侵犯,即表示玩家A是玩家B的盟友.

---@param whichPlayer player
---@param otherPlayer player
---@return boolean
cj.IsPlayerAlly = function(whichPlayer, otherPlayer)end

---摇晃玩家的镜头源,摇晃幅度:${Magnitude}速率:${Velocity}摇晃方式:${方式}
---摇晃镜头目标(所有玩家)[R]
---使用'镜头-重置镜头'或设置摇晃幅度和速率为0来停止摇晃.

---@param mag real
---@param velocity real
---@param vertOnly boolean
---@return nothing
cj.CameraSetTargetNoiseEx = function(mag, velocity, vertOnly)end

---${Player}在${玩家组}中
---在玩家组

---@param whichPlayer player
---@param whichForce force
---@return boolean
cj.IsPlayerInForce = function(whichPlayer, whichForce)end

---${Player}的玩家ID-1
---玩家ID-1[R]
---玩家ID取值1-16.

---@param whichPlayer player
---@return integer
cj.GetPlayerId = function(whichPlayer)end


---@param whichPlayer player
---@param techid integer
---@param setToLevel integer
---@return nothing
cj.SetPlayerTechResearched = function(whichPlayer, techid, setToLevel)end


---@param abilityId integer
---@param t soundtype
---@return string
cj.GetAbilitySoundById = function(abilityId, t)end


---@param whichPlayer player
---@param techid integer
---@param specificonly boolean
---@return boolean
cj.GetPlayerTechResearched = function(whichPlayer, techid, specificonly)end


---@param whichPlayer player
---@param techid integer
---@param specificonly boolean
---@return integer
cj.GetPlayerTechCount = function(whichPlayer, techid, specificonly)end

---设置${Player}的${技能}为${Enable/Disable}
---允许/禁用技能[R]
---设置玩家能否使用该技能.

---@param whichPlayer player
---@param abilid integer
---@param avail boolean
---@return nothing
cj.SetPlayerAbilityAvailable = function(whichPlayer, abilid, avail)end


---@param whichPlayer player
---@param unitName string
---@param includeIncomplete boolean
---@param includeUpgrades boolean
---@return integer
cj.GetPlayerTypedUnitCount = function(whichPlayer, unitName, includeIncomplete, includeUpgrades)end

---${Enable/Disable}选择和取消选择功能(${Enable/Disable}显示选择圈)
---允许/禁用选择
---禁用选择后仍可以通过触发来选择物体.只有允许选择功能时才会显示选择圈.

---@param state boolean
---@param ui boolean
---@return nothing
cj.EnableSelect = function(state, ui)end

---${Player}拥有的建筑数量(${Include/Exclude}未完成的)
---建筑数量

---@param whichPlayer player
---@param includeIncomplete boolean
---@return integer
cj.GetPlayerStructureCount = function(whichPlayer, includeIncomplete)end

---坐标(${x},${y})对${玩家}可见
---坐标可见

---@param x real
---@param y real
---@param whichPlayer player
---@return boolean
cj.IsVisibleToPlayer = function(x, y, whichPlayer)end

---${指定点}对${Player}可见
---点可见

---@param whichLocation location
---@param whichPlayer player
---@return boolean
cj.IsLocationVisibleToPlayer = function(whichLocation, whichPlayer)end


---@param movieName string
---@return nothing
cj.PlayCinematic = function(movieName)end

---坐标(${x},${y})在${玩家}的迷雾范围内
---坐标在迷雾中
---黑色阴影内的坐标不被计算在内。

---@param x real
---@param y real
---@param whichPlayer player
---@return boolean
cj.IsFoggedToPlayer = function(x, y, whichPlayer)end

---${Player}${Property}
---玩家属性

---@param whichPlayer player
---@param whichPlayerState playerstate
---@return integer
cj.GetPlayerState = function(whichPlayer, whichPlayerState)end

---${Player}${Score}
---玩家得分

---@param whichPlayer player
---@param whichPlayerScore playerscore
---@return integer
cj.GetPlayerScore = function(whichPlayer, whichPlayerScore)end


---@param whichFlags texmapflags
---@return nothing
cj.SetCineFilterTexMapFlags = function(whichFlags)end

---${Player}对${Player}开启${AllianceType}
---联盟状态设置

---@param sourcePlayer player
---@param otherPlayer player
---@param whichAllianceSetting alliancetype
---@return boolean
cj.GetPlayerAlliance = function(sourcePlayer, otherPlayer, whichAllianceSetting)end

---让所有玩家停止播放镜头
---停止播放镜头(所有玩家)[R]
---比如在平移镜头的过程中可用该动作来中断平移.

---@param undefined nothing
---@return nothing
cj.StopCamera = function(undefined)end


---@param whichPlayer player
---@return real
cj.GetPlayerHandicap = function(whichPlayer)end


---@param whichPlayer player
---@return real
cj.GetPlayerHandicapXP = function(whichPlayer)end

---设置${Multiboard}${Minimize/Maximize}
---最大/最小化[R]
---最小化的多面板只显示标题.

---@param lb multiboard
---@param minimize boolean
---@return nothing
cj.MultiboardMinimize = function(lb, minimize)end

---设置${Player}的经验获得率为正常的${Value}倍
---设置经验获得率[R]

---@param whichPlayer player
---@param handicap real
---@return nothing
cj.SetPlayerHandicapXP = function(whichPlayer, handicap)end


---@param lb leaderboard
---@param label string
---@return nothing
cj.LeaderboardSetLabel = function(lb, label)end


---@param whichPlayer player
---@param newOwner integer
---@return nothing
cj.SetPlayerUnitsOwner = function(whichPlayer, newOwner)end


---@param undefined nothing
---@return version
cj.VersionGet = function(undefined)end

---清空${排行榜}
---清空[R]
---清空排行榜中所有内容.

---@param lb leaderboard
---@return nothing
cj.LeaderboardClear = function(lb)end


---@param whichVersion version
---@return boolean
cj.VersionCompatible = function(whichVersion)end


---@param whichVersion version
---@return boolean
cj.VersionSupported = function(whichVersion)end


---@param sourceDirName string
---@return boolean
cj.RemoveSaveDirectory = function(sourceDirName)end


---@param sourceSaveName string
---@param destSaveName string
---@return boolean
cj.CopySaveGame = function(sourceSaveName, destSaveName)end


---@param whichFloatGameState fgamestate
---@param value real
---@return nothing
cj.SetFloatGameState = function(whichFloatGameState, value)end


---@param whichFloatGameState fgamestate
---@return real
cj.GetFloatGameState = function(whichFloatGameState)end


---@param whichIntegerGameState igamestate
---@param value integer
---@return nothing
cj.SetIntegerGameState = function(whichIntegerGameState, value)end

---新建对话框
---新建对话框[R]
---创建新的对话框.

---@param undefined nothing
---@return dialog
cj.DialogCreate = function(undefined)end

---删除${对话框}
---删除[R]
---将对话框清除出内存.一般来说对话框并不需要删除.

---@param whichDialog dialog
---@return nothing
cj.DialogDestroy = function(whichDialog)end


---@param whichDialog dialog
---@return nothing
cj.DialogClear = function(whichDialog)end

---给${对话框}添加按钮,使用标题:${文字}快捷键:${HotKey}
---添加对话框按钮[R]
---会创建对话框按钮.

---@param whichDialog dialog
---@param buttonText string
---@param hotkey integer
---@return button
cj.DialogAddButton = function(whichDialog, buttonText, hotkey)end

---当前镜头目标Z坐标
---当前镜头目标Z坐标
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return real
cj.GetCameraTargetPositionZ = function(undefined)end

---为${对话框}添加退出游戏按钮(${跳过}计分屏)按钮标题为:${文字}快捷键为:${HotKey}
---添加退出游戏按钮[R]
---该函数创建的按钮并不被纪录到'最后创建的对话框按钮'.当该按钮被点击时会退出游戏

---@param whichDialog dialog
---@param doScoreScreen boolean
---@param buttonText string
---@param hotkey integer
---@return button
cj.DialogAddQuitButton = function(whichDialog, doScoreScreen, buttonText, hotkey)end

---对${Player}设置${对话框}的状态为${Show/Hide}
---显示/隐藏[R]
---对话框不能应用于地图初始化事件.

---@param whichPlayer player
---@param whichDialog dialog
---@param flag boolean
---@return nothing
cj.DialogDisplay = function(whichPlayer, whichDialog, flag)end

---平移玩家镜头到(${X},${Y}),持续${Time}秒
---平移镜头(所有玩家)(限时)[R]

---@param x real
---@param y real
---@param duration real
---@return nothing
cj.PanCameraToTimed = function(x, y, duration)end

---新建游戏缓存:${缓存名}
---新建游戏缓存[R]
---创建一个新的游戏缓存,一个地图最多只有有256个游戏缓存.

---@param campaignFile string
---@return gamecache
cj.InitGameCache = function(campaignFile)end


---@param campaignNumber integer
---@param missionNumber integer
---@param available boolean
---@return nothing
cj.SetMissionAvailable = function(campaignNumber, missionNumber, available)end


---@param campaignNumber integer
---@param available boolean
---@return nothing
cj.SetCampaignAvailable = function(campaignNumber, available)end


---@param campaignIndex integer
---@return nothing
cj.SetCampaignMenuRaceEx = function(campaignIndex)end


---@param soundHandle sound
---@param byPosition boolean
---@param rectwidth real
---@param rectheight real
---@return nothing
cj.UnregisterStackedSound = function(soundHandle, byPosition, rectwidth, rectheight)end


---@param cleared boolean
---@return nothing
cj.SetTutorialCleared = function(cleared)end


---@param undefined nothing
---@return gamedifficulty
cj.GetDefaultDifficulty = function(undefined)end


---@param g gamedifficulty
---@return nothing
cj.SetDefaultDifficulty = function(g)end

---小地图${Show/Hide}中立生物
---设置小地图中立生物显示
---相当于游戏中Alt+R功能.

---@param state boolean
---@return nothing
cj.SetCreepCampFilterState = function(state)end

---从本地硬盘读取缓存数据
---读取本地缓存数据
---只对单机游戏有效,从本地硬盘读取缓存数据,主要用来实现战役关卡间的数据传递.

---@param undefined nothing
---@return boolean
cj.ReloadGameCachesFromDisk = function(undefined)end


---@param whichButton integer
---@return boolean
cj.GetCustomCampaignButtonVisible = function(whichButton)end


---@param whichCache gamecache
---@return boolean
cj.SaveGameCache = function(whichCache)end

---缓存:${GameCache}类别名:${Category}使用名称:${文字}记录:${字符串}
---记录字符串
---使用'游戏缓存-读取字符串'来读取该值.名称和类别名不能包含空格.

---@param cache gamecache
---@param missionKey string
---@param key string
---@param value string
---@return boolean
cj.StoreString = function(cache, missionKey, key, value)end


---@param undefined nothing
---@return integer
cj.ChooseRandomNPBuilding = function(undefined)end

---摇晃玩家的镜头源,摇晃幅度:${Magnitude}速率:${Velocity}摇晃方式:${方式}
---摇晃镜头源(所有玩家)[R]
---使用'镜头-重置镜头'或设置摇晃幅度和速率为0来停止摇晃.

---@param mag real
---@param velocity real
---@param vertOnly boolean
---@return nothing
cj.CameraSetSourceNoiseEx = function(mag, velocity, vertOnly)end


---@param whichSetup camerasetup
---@param doPan boolean
---@param panTimed boolean
---@return nothing
cj.CameraSetupApply = function(whichSetup, doPan, panTimed)end


---@param whichCondition defeatcondition
---@param description string
---@return nothing
cj.DefeatConditionSetDescription = function(whichCondition, description)end

---对${玩家}在屏幕位移(${X},${Y})处显示${时间}秒的文本信息:${文字}
---对玩家显示文本消息(指定时间)[R]
---位移的取值在0-1之间.可使用'本地玩家[R]'实现对所有玩家发送消息.

---@param toPlayer player
---@param x real
---@param y real
---@param duration real
---@param message string
---@return nothing
cj.DisplayTimedTextToPlayer = function(toPlayer, x, y, duration, message)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.SyncStoredInteger = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.SyncStoredBoolean = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.SyncStoredString = function(cache, missionKey, key)end

---选取圆心为(${X},${Y}),半径为${半径}的圆范围内的${装饰物类型}(选取方式:${选取方式}),做${AnimationName}动作(${允许/禁止}随机播放)
---播放圆范围内地形装饰物动画[R]
---特殊动画名:'show','hide','soundon','soundoff'.随机播放:比如某装饰物有好几个'stand'动作,则允许该项时会随机抽取某个动作播放,而禁止该项时只播放首个动作.

---@param x real
---@param y real
---@param radius real
---@param doodadID integer
---@param nearestOnly boolean
---@param animName string
---@param animRandom boolean
---@return nothing
cj.SetDoodadAnimation = function(x, y, radius, doodadID, nearestOnly, animName, animRandom)end

---从${GameCache}中读取整数值,类别:${Category},名称:${文字}
---缓存读取整数[C]
---如果该值不存在则返回0.

---@param cache gamecache
---@param missionKey string
---@param key string
---@return integer
cj.GetStoredInteger = function(cache, missionKey, key)end


---@param x real
---@param y real
---@return nothing
cj.PanCameraTo = function(x, y)end

---从${GameCache}中读取实数,类别:${Category}名称:${文字}
---缓存读取实数[C]
---如果该值不存在则返回0.

---@param cache gamecache
---@param missionKey string
---@param key string
---@return real
cj.GetStoredReal = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@param forWhichPlayer player
---@param x real
---@param y real
---@param facing real
---@return unit
cj.RestoreUnit = function(cache, missionKey, key, forWhichPlayer, x, y, facing)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.HaveStoredInteger = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.HaveStoredUnit = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
cj.HaveStoredString = function(cache, missionKey, key)end


---@param cache gamecache
---@param missionKey string
---@param key string
---@return nothing
cj.FlushStoredBoolean = function(cache, missionKey, key)end

---创建一个新的哈希表
---<1.24>新建哈希表[C]
---您可以使用哈希表来储存临时数据

---@param undefined nothing
---@return hashtable
cj.InitHashtable = function(undefined)end

---新建的空单位池
---新建单位池[R]
---会创建单位池。

---@param undefined nothing
---@return unitpool
cj.CreateUnitPool = function(undefined)end


---@param soundHandle sound
---@param cutoff real
---@return nothing
cj.SetSoundDistanceCutoff = function(soundHandle, cutoff)end


---@param b boolean
---@return nothing
cj.EnableUserUI = function(b)end

---平移玩家镜头到(${X},${Y}),镜头距离地面高度为${Z},持续${Time}秒
---指定高度平移镜头(所有玩家)(限时)[R]
---在指定移动路径上镜头不会低于地面高度.

---@param x real
---@param y real
---@param zOffsetDest real
---@param duration real
---@return nothing
cj.PanCameraToTimedWithZ = function(x, y, zOffsetDest, duration)end


---@param soundHandle sound
---@param x real
---@param y real
---@param z real
---@return nothing
cj.SetSoundConeOrientation = function(soundHandle, x, y, z)end

---随机整数,最小值:${Minimum}最大值:${Maximum}
---随机整数

---@param lowBound integer
---@param highBound integer
---@return integer
cj.GetRandomInt = function(lowBound, highBound)end

---删除${单位池}
---删除单位池[R]

---@param whichPool unitpool
---@return nothing
cj.DestroyUnitPool = function(whichPool)end

---在${物品池}中添加一个${物品}比重为${数值}
---添加物品类型[R]
---比重越高被选择的机率越大.

---@param whichItemPool itempool
---@param itemId integer
---@param weight real
---@return nothing
cj.ItemPoolAddItemType = function(whichItemPool, itemId, weight)end

---从${物品池}中删除${物品}
---删除物品类型[R]

---@param whichItemPool itempool
---@param itemId integer
---@return nothing
cj.ItemPoolRemoveItemType = function(whichItemPool, itemId)end

---设置重新开始任务按钮可以点击为${}
---禁用重新开始任务按钮
---当单人游戏时，可以设置重新开始任务按钮能否允许点击。

---@param flag boolean
---@return nothing
cj.DisableRestartMission = function(flag)end


---@param introModelPath string
---@return nothing
cj.SetIntroShotModel = function(introModelPath)end


---@param lb leaderboard
---@return nothing
cj.DestroyLeaderboard = function(lb)end


---@param key string
---@return nothing
cj.ForceUIKey = function(key)end


---@param undefined nothing
---@return nothing
cj.ForceUICancel = function(undefined)end


---@param undefined nothing
---@return nothing
cj.DisplayLoadDialog = function(undefined)end


---@param a real
---@param b real
---@param c real
---@param d real
---@param e real
---@return nothing
cj.SetTerrainFog = function(a, b, c, d, e)end


---@param a real
---@param b real
---@param c real
---@param d real
---@param e real
---@return nothing
cj.SetUnitFog = function(a, b, c, d, e)end


---@param lb multiboard
---@param showValues boolean
---@param showIcons boolean
---@return nothing
cj.MultiboardSetItemsStyle = function(lb, showValues, showIcons)end

---迷雾风格:${Style},Z轴开始端:${Z-Start},Z轴结束端:${Z-End},密度:${Density}颜色:(${Red},${Green},${Blue})
---设置迷雾[R]
---颜色格式为(红,绿,蓝).取值范围0.00-1.00.

---@param style integer
---@param zstart real
---@param zend real
---@param density real
---@param red real
---@param green real
---@param blue real
---@return nothing
cj.SetTerrainFogEx = function(style, zstart, zend, density, red, green, blue)end


---@param terrainDNCFile string
---@param unitDNCFile string
---@return nothing
cj.SetDayNightModels = function(terrainDNCFile, unitDNCFile)end

---设置${TimerWindow}的时间流逝速度为${Factor}倍
---设置计时器窗口速率[R]
---同时计时器显示时间也会随之变化.就是说60秒的计时器设置为2倍速则显示时间也会变为120秒.

---@param whichDialog timerdialog
---@param speedMultFactor real
---@return nothing
cj.TimerDialogSetSpeed = function(whichDialog, speedMultFactor)end

---设置天空模型为${Sky}
---设置天空

---@param skyModelFile string
---@return nothing
cj.SetSkyModel = function(skyModelFile)end

---${暂停/恢复}游戏
---暂停/恢复游戏[R]

---@param flag boolean
---@return nothing
cj.PauseGame = function(flag)end

---对所有玩家发送小地图信号到坐标(${X},${Y})持续时间:${Duration}秒,信号颜色:(${Red},${Green},${Blue})信号类型:${Style}
---小地图信号(指定颜色)(所有玩家)[R]
---颜色格式为(红,绿,蓝).颜色值取值范围为0-255.

---@param x real
---@param y real
---@param duration real
---@param red integer
---@param green integer
---@param blue integer
---@param extraEffects boolean
---@return nothing
cj.PingMinimapEx = function(x, y, duration, red, green, blue, extraEffects)end

---${Enable/Disable}闭塞
---允许/禁止闭塞(所有玩家)[R]

---@param flag boolean
---@return nothing
cj.EnableOcclusion = function(flag)end

---${Enable/Disable}边界染色,应用于所有玩家
---允许/禁止边界染色(所有玩家)[R]
---禁用边界染色时边界为普通地形,不显示为黑色,但仍是不可通行的.

---@param b boolean
---@return nothing
cj.EnableWorldFogBoundary = function(b)end

---新建的空漂浮文字
---新建漂浮文字[R]
---会创建漂浮文字.

---@param undefined nothing
---@return texttag
cj.CreateTextTag = function(undefined)end


---@param t texttag
---@return nothing
cj.DestroyTextTag = function(t)end

---改变${Image}的位置为(${X},${Y}),Z轴偏移为${Z}
---改变图像位置(指定坐标)[R]
---指图像的左下角位置.

---@param whichImage image
---@param x real
---@param y real
---@param z real
---@return nothing
cj.SetImagePosition = function(whichImage, x, y, z)end

---设置${WeatherEffect}的状态为:${On/Off}
---启用/禁用天气效果
---可以使用'环境-创建天气效果'动作来创建天气效果.

---@param whichEffect weathereffect
---@param enable boolean
---@return nothing
cj.EnableWeatherEffect = function(whichEffect, enable)end

---改变${FloatingText}的内容为${文字},字体大小:${Size}
---改变文字内容[R]
---采用原始字体大小单位.字体大小不能超过0.5.

---@param t texttag
---@param s string
---@param height real
---@return nothing
cj.SetTextTagText = function(t, s, height)end

---改变${FloatingText}的位置为(${X},${Y}),Z轴高度为${Z}
---改变位置(坐标)[R]

---@param t texttag
---@param x real
---@param y real
---@param heightOffset real
---@return nothing
cj.SetTextTagPos = function(t, x, y, heightOffset)end

---改变${FloatingText}的颜色为(${Red},${Green},${Blue})透明值为${Transparency}
---改变颜色[R]
---颜色格式为(红,绿,蓝).透明值0为不可见.颜色值和透明值取值范围为0-255.

---@param t texttag
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetTextTagColor = function(t, red, green, blue, alpha)end

---设置${FloatingText}的X轴速率:${XSpeed},Y轴速率:${YSpeed}
---设置速率[R]
---对移动后的漂浮文字设置速率,该漂浮文字会先回到原点再向设定的角度移动.这里的1约等于游戏中的1800速度.

---@param t texttag
---@param xvel real
---@param yvel real
---@return nothing
cj.SetTextTagVelocity = function(t, xvel, yvel)end


---@param soundHandle sound
---@param whichUnit unit
---@return nothing
cj.AttachSoundToUnit = function(soundHandle, whichUnit)end

---对所有玩家${Show/Hide}${FloatingText}
---显示/隐藏(所有玩家)[R]

---@param t texttag
---@param flag boolean
---@return nothing
cj.SetTextTagVisibility = function(t, flag)end


---@param t texttag
---@param lifespan real
---@return nothing
cj.SetTextTagLifespan = function(t, lifespan)end

---设置联盟颜色显示状态为${State}
---设置联盟颜色显示
---0为不开启.1为小地图显示.2为小地图和游戏都显示.相当于游戏中Alt+A功能.

---@param state integer
---@return nothing
cj.SetAllyColorFilterState = function(state)end

---小地图中立生物显示开启
---小地图中立生物显示开启

---@param undefined nothing
---@return boolean
cj.GetCreepCampFilterState = function(undefined)end

---${Enable/Disable}联盟颜色显示按钮,${Enable/Disable}中立生物显示按钮
---允许/禁用小地图按钮

---@param enableAlly boolean
---@param enableCreep boolean
---@return nothing
cj.EnableMinimapFilterButtons = function(enableAlly, enableCreep)end

---${Enable/Disable}框选功能(${Enable/Disable}显示选择框)
---允许/禁用框选

---@param state boolean
---@param ui boolean
---@return nothing
cj.EnableDragSelect = function(state, ui)end

---鼠标点击${可追踪物}
---鼠标点击可追踪物[R]

---@param whichTrigger trigger
---@param t trackable
---@return event
cj.TriggerRegisterTrackableHitEvent = function(whichTrigger, t)end

---鼠标移动到${可追踪物}
---鼠标移动到追踪对象[R]

---@param whichTrigger trigger
---@param t trackable
---@return event
cj.TriggerRegisterTrackableTrackEvent = function(whichTrigger, t)end

---新建任务
---新建任务[R]
---新建一个任务.注：这条毫无用处，别用——everguo

---@param undefined nothing
---@return quest
cj.CreateQuest = function(undefined)end


---@param whichQuest quest
---@param description string
---@return nothing
cj.QuestSetDescription = function(whichQuest, description)end


---@param whichQuest quest
---@param iconPath string
---@return nothing
cj.QuestSetIconPath = function(whichQuest, iconPath)end


---@param whichQuest quest
---@param required boolean
---@return nothing
cj.QuestSetRequired = function(whichQuest, required)end


---@param fadeOut boolean
---@return nothing
cj.StopMusic = function(fadeOut)end


---@param whichQuest quest
---@param completed boolean
---@return nothing
cj.QuestSetCompleted = function(whichQuest, completed)end


---@param whichQuest quest
---@param failed boolean
---@return nothing
cj.QuestSetFailed = function(whichQuest, failed)end

---${Quest}已完成
---任务完成

---@param whichQuest quest
---@return boolean
cj.IsQuestCompleted = function(whichQuest)end

---${Quest}已被发现
---任务被发现

---@param whichQuest quest
---@return boolean
cj.IsQuestDiscovered = function(whichQuest)end


---@param mbi multiboarditem
---@param width real
---@return nothing
cj.MultiboardSetItemWidth = function(mbi, width)end


---@param undefined nothing
---@return defeatcondition
cj.CreateDefeatCondition = function(undefined)end


---@param undefined nothing
---@return nothing
cj.FlashQuestDialogButton = function(undefined)end


---@param whichDialog timerdialog
---@return nothing
cj.DestroyTimerDialog = function(whichDialog)end


---@param whichDialog timerdialog
---@return boolean
cj.IsTimerDialogDisplayed = function(whichDialog)end


---@param whichDialog timerdialog
---@param timeRemaining real
---@return nothing
cj.TimerDialogSetRealTimeRemaining = function(whichDialog, timeRemaining)end

---${Leaderboard}的行数
---行数

---@param lb leaderboard
---@return integer
cj.LeaderboardGetItemCount = function(lb)end


---@param lb leaderboard
---@param count integer
---@return nothing
cj.LeaderboardSetSizeByItemCount = function(lb, count)end


---@param lb leaderboard
---@param index integer
---@return nothing
cj.LeaderboardRemoveItem = function(lb, index)end


---@param lb leaderboard
---@param ascending boolean
---@return nothing
cj.LeaderboardSortItemsByPlayer = function(lb, ascending)end


---@param lb leaderboard
---@param ascending boolean
---@return nothing
cj.LeaderboardSortItemsByLabel = function(lb, ascending)end


---@param lb leaderboard
---@return string
cj.LeaderboardGetLabelText = function(lb)end

---设置${Leaderboard}的数值颜色为(${Red},${Green},${Blue})Alpha通道值为:${Transparency}
---设置数值颜色[R]
---颜色格式为(红,绿,蓝).Alpha通道值0为不可见.颜色值和Alpha通道值取值范围为0-255.

---@param lb leaderboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.LeaderboardSetValueColor = function(lb, red, green, blue, alpha)end


---@param lb leaderboard
---@param whichItem integer
---@param showLabel boolean
---@param showValue boolean
---@param showIcon boolean
---@return nothing
cj.LeaderboardSetItemStyle = function(lb, whichItem, showLabel, showValue, showIcon)end


---@param undefined nothing
---@return real
cj.GetCameraBoundMinX = function(undefined)end


---@param lb leaderboard
---@param whichItem integer
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.LeaderboardSetItemValueColor = function(lb, whichItem, red, green, blue, alpha)end

---新建的空多面板
---新建多面板[R]
---会创建多面板.

---@param undefined nothing
---@return multiboard
cj.CreateMultiboard = function(undefined)end


---@param lb multiboard
---@return nothing
cj.DestroyMultiboard = function(lb)end

---${Multiboard}是显示的
---多面板显示

---@param lb multiboard
---@return boolean
cj.IsMultiboardDisplayed = function(lb)end

---设置${Multiboard}的标题为${文字}
---设置标题

---@param lb multiboard
---@param label string
---@return nothing
cj.MultiboardSetTitleText = function(lb, label)end

---设置${Multiboard}的标题颜色为(${Red},${Green},${Blue}),Alpha值为${Transparency}
---设置标题颜色[R]
---颜色格式为(红,绿,蓝).Alpha值为0是不可见的.颜色值和Alpha值取值范围为0-255.

---@param lb multiboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.MultiboardSetTitleTextColor = function(lb, red, green, blue, alpha)end


---@param lb multiboard
---@param value string
---@return nothing
cj.MultiboardSetItemsValue = function(lb, value)end


---@param lb multiboard
---@param iconPath string
---@return nothing
cj.MultiboardSetItemsIcon = function(lb, iconPath)end

---删除${多面板项目}
---删除多面板项目[R]
---并不会影响对多面板的显示.多面板项目指向多面板但不附属于多面板.

---@param mbi multiboarditem
---@return nothing
cj.MultiboardReleaseItem = function(mbi)end


---@param flag boolean
---@return nothing
cj.DisplayCineFilter = function(flag)end

---设置${多面板项目}的显示风格:${Show/Hide}文字${Show/Hide}图标
---设置指定项目显示风格[R]

---@param mbi multiboarditem
---@param showValue boolean
---@param showIcon boolean
---@return nothing
cj.MultiboardSetItemStyle = function(mbi, showValue, showIcon)end

---设置玩家可用镜头区域:左下角(${X},${Y}),左上角(${X},${Y}),右上角(${X},${Y}),右下角(${X},${Y})
---设置可用镜头区域(所有玩家)[R]
---该动作同样会影响小地图的显示.但小地图的图片是无法改变的.实际可用区域要大于可用镜头区域.

---@param x1 real
---@param y1 real
---@param x2 real
---@param y2 real
---@param x3 real
---@param y3 real
---@param x4 real
---@param y4 real
---@return nothing
cj.SetCameraBounds = function(x1, y1, x2, y2, x3, y3, x4, y4)end

---${打开/关闭}隐藏多面板模式
---显示/隐藏多面板模式[R]
---隐藏多面板模式将无法显示多面板.

---@param flag boolean
---@return nothing
cj.MultiboardSuppressDisplay = function(flag)end

---设置玩家的空格键转向点为(${X},${Y})
---设置空格键转向点(所有玩家)[R]
---按下空格键时镜头转向的位置.

---@param x real
---@param y real
---@return nothing
cj.SetCameraQuickPosition = function(x, y)end

---重置玩家镜头为游戏默认状态,持续${Time}秒
---重置游戏镜头(所有玩家)[R]

---@param duration real
---@return nothing
cj.ResetToGameCamera = function(duration)end

---对所有玩家播放电影镜头:${CameraFile}
---播放电影镜头(所有玩家)[R]
---在'Objects\\CinematicCameras'目录下有一些电影镜头,可用Mpq工具来查询.

---@param cameraModelFile string
---@return nothing
cj.SetCinematicCamera = function(cameraModelFile)end


---@param whichField camerafield
---@param offset real
---@param duration real
---@return nothing
cj.AdjustCameraField = function(whichField, offset, duration)end

---锁定玩家镜头到${单位},偏移坐标(${X},${Y}),使用${RotationSource}
---锁定镜头到单位(所有玩家)[R]
---偏移坐标(X,Y)以单位脚底为原点坐标.

---@param whichUnit unit
---@param xoffset real
---@param yoffset real
---@param inheritOrientation boolean
---@return nothing
cj.SetCameraTargetController = function(whichUnit, xoffset, yoffset, inheritOrientation)end

---以(${X},${Y})为中心,旋转弧度为${Rad},持续:${Time}秒
---指定点旋转镜头(所有玩家)(弧度)(限时)[R]

---@param x real
---@param y real
---@param radiansToSweep real
---@param duration real
---@return nothing
cj.SetCameraRotateMode = function(x, y, radiansToSweep, duration)end

---将${镜头}应用方式设置为${ApplyMethod},持续${Time}秒
---应用镜头(所有玩家)(限时)[R]

---@param whichSetup camerasetup
---@param doPan boolean
---@param forceDuration real
---@return nothing
cj.CameraSetupApplyForceDuration = function(whichSetup, doPan, forceDuration)end


---@param mag real
---@param velocity real
---@return nothing
cj.CameraSetSourceNoise = function(mag, velocity)end


---@param factor real
---@return nothing
cj.CameraSetSmoothingFactor = function(factor)end


---@param whichMargin integer
---@return real
cj.GetCameraMargin = function(whichMargin)end


---@param undefined nothing
---@return real
cj.GetCameraBoundMaxY = function(undefined)end

---当前镜头的${CameraField}
---镜头属性(当前镜头)
---注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param whichField camerafield
---@return real
cj.GetCameraField = function(whichField)end

---当前镜头目标点
---当前镜头目标点
---会创建点.注意:该函数对各玩家返回值不同,请确定你知道自己在做什么,否则很容易引起掉线.

---@param undefined nothing
---@return location
cj.GetCameraTargetPositionLoc = function(undefined)end


---@param whichMode blendmode
---@return nothing
cj.SetCineFilterBlendMode = function(whichMode)end


---@param musicName string
---@param frommsecs integer
---@param fadeinmsecs integer
---@return nothing
cj.PlayMusicEx = function(musicName, frommsecs, fadeinmsecs)end


---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetCineFilterStartColor = function(red, green, blue, alpha)end


---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetCineFilterEndColor = function(red, green, blue, alpha)end


---@param duration real
---@return nothing
cj.SetCineFilterDuration = function(duration)end


---@param undefined nothing
---@return boolean
cj.IsCineFilterDisplayed = function(undefined)end


---@param portraitUnitId integer
---@param color playercolor
---@param speakerTitle string
---@param text string
---@param sceneDuration real
---@param voiceoverDuration real
---@return nothing
cj.SetCinematicScene = function(portraitUnitId, color, speakerTitle, text, sceneDuration, voiceoverDuration)end


---@param undefined nothing
---@return nothing
cj.EndCinematicScene = function(undefined)end


---@param flag boolean
---@return nothing
cj.ForceCinematicSubtitles = function(flag)end


---@param environmentName string
---@return nothing
cj.NewSoundEnvironment = function(environmentName)end


---@param fileName string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@param eaxSetting string
---@return sound
cj.CreateSound = function(fileName, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate, eaxSetting)end


---@param fileName string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@param SLKEntryName string
---@return sound
cj.CreateSoundFilenameWithLabel = function(fileName, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate, SLKEntryName)end


---@param soundLabel string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@return sound
cj.CreateSoundFromLabel = function(soundLabel, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate)end


---@param soundLabel string
---@param fadeInRate integer
---@param fadeOutRate integer
---@return sound
cj.CreateMIDISound = function(soundLabel, fadeInRate, fadeOutRate)end

---设置${音效}的音量为${Volume}
---设置音效音量[R]
---音量取值范围0-127.

---@param soundHandle sound
---@param volume integer
---@return nothing
cj.SetSoundVolume = function(soundHandle, volume)end


---@param whichBolt lightning
---@return real
cj.GetLightningColorR = function(whichBolt)end


---@param soundHandle sound
---@param pitch real
---@return nothing
cj.SetSoundPitch = function(soundHandle, pitch)end

---设置${音效}的播放时间点为${Offset}毫秒
---设置音效播放时间点[R]
---音效必须是正在播放的.不能用于3D音效.

---@param soundHandle sound
---@param millisecs integer
---@return nothing
cj.SetSoundPlayPosition = function(soundHandle, millisecs)end


---@param whichEffect weathereffect
---@return nothing
cj.RemoveWeatherEffect = function(whichEffect)end

---设置${3D音效}的衰减最小范围:${数值}最大范围:${数值}
---设置3D音效衰减范围
---该动作仅用于3D音效.注意不一定要达到最大范围,音量衰减到一定程度也会变没的.

---@param soundHandle sound
---@param minDist real
---@param maxDist real
---@return nothing
cj.SetSoundDistances = function(soundHandle, minDist, maxDist)end


---@param soundHandle sound
---@param inside real
---@param outside real
---@param outsideVolume integer
---@return nothing
cj.SetSoundConeAngles = function(soundHandle, inside, outside, outsideVolume)end

---设置${3D音效}的播放位置为(${X},${Y}),Z轴高度为${Z}
---设置3D音效位置(指定坐标)[R]
---该动作仅用于3D音效.

---@param soundHandle sound
---@param x real
---@param y real
---@param z real
---@return nothing
cj.SetSoundPosition = function(soundHandle, x, y, z)end


---@param soundHandle sound
---@return nothing
cj.StartSound = function(soundHandle)end

---设置背景音乐列表为:${Music},${允许/禁止}随机播放,开始播放序号为${Index}
---设置背景音乐列表[R]
---可指定播放文件或播放目录.

---@param musicName string
---@param random boolean
---@param index integer
---@return nothing
cj.SetMapMusic = function(musicName, random, index)end


---@param undefined nothing
---@return nothing
cj.ClearMapMusic = function(undefined)end


---@param undefined nothing
---@return nothing
cj.ResumeMusic = function(undefined)end

---设置背景音乐音量为${Volume}
---设置背景音乐音量[R]
---音量取值范围为0-127.

---@param volume integer
---@return nothing
cj.SetMusicVolume = function(volume)end


---@param millisecs integer
---@return nothing
cj.SetMusicPlayPosition = function(millisecs)end

---设置当前主题音乐播放时间点为${Offset}毫秒
---设置主题音乐播放时间点[R]

---@param millisecs integer
---@return nothing
cj.SetThematicMusicPlayPosition = function(millisecs)end


---@param soundHandle sound
---@param duration integer
---@return nothing
cj.SetSoundDuration = function(soundHandle, duration)end


---@param musicFileName string
---@return integer
cj.GetSoundFileDuration = function(musicFileName)end


---@param undefined nothing
---@return nothing
cj.VolumeGroupReset = function(undefined)end


---@param soundHandle sound
---@return boolean
cj.GetSoundIsLoading = function(soundHandle)end


---@param soundHandle sound
---@param byPosition boolean
---@param rectwidth real
---@param rectheight real
---@return nothing
cj.RegisterStackedSound = function(soundHandle, byPosition, rectwidth, rectheight)end

---新建的在${矩形区域}的天气效果:${WeatherId}
---新建天气效果[R]
---会创建天气效果.

---@param where rect
---@param effectID integer
---@return weathereffect
cj.AddWeatherEffect = function(where, effectID)end

---新建的波纹变形.中心坐标:(${X},${Y})最终半径:${Radius}深度:${Depth}持续时间:${Duration}毫秒,变化次数:${Count}面波数:${SpaceWave}总波数:${TimeWave}初始半径率:${数值}变化类型:${Type}
---新建地形变化:波纹[R]
---初始半径率=初始半径/最终半径.

---@param x real
---@param y real
---@param radius real
---@param depth real
---@param duration integer
---@param count integer
---@param spaceWaves real
---@param timeWaves real
---@param radiusStartPct real
---@param limitNeg boolean
---@return terraindeformation
cj.TerrainDeformRipple = function(x, y, radius, depth, duration, count, spaceWaves, timeWaves, radiusStartPct, limitNeg)end

---新建的冲击波变形.起始坐标:(${X},${Y})波方向:(${X},${Y})波距离:${distance}波速度:${speed}波半径:${radius}深度:${Depth}变形效果持续时间:${Delay}毫秒,变化次数:${Count}
---新建地形变化:冲击波[R]
---深度可取负数.方向以(X,Y)坐标形式表示,如(1,1)表示45度.

---@param x real
---@param y real
---@param dirX real
---@param dirY real
---@param distance real
---@param speed real
---@param radius real
---@param depth real
---@param trailTime integer
---@param count integer
---@return terraindeformation
cj.TerrainDeformWave = function(x, y, dirX, dirY, distance, speed, radius, depth, trailTime, count)end

---停止${TerrainDeformation},衰退时间:${Duration}毫秒
---停止地形变化[R]
---地形变化会平滑地过渡到无.

---@param deformation terraindeformation
---@param duration integer
---@return nothing
cj.TerrainDeformStop = function(deformation, duration)end

---新建特效${ModelFile}在(${X},${Y})处
---新建特效(创建到坐标)[R]
---会创建特效.

---@param modelName string
---@param x real
---@param y real
---@return effect
cj.AddSpecialEffect = function(modelName, x, y)end


---@param abilityString string
---@param t effecttype
---@param where location
---@return effect
cj.AddSpellEffectLoc = function(abilityString, t, where)end

---${技能}的${EffectType},创建到${指定点}
---新建特效(指定技能，创建到点)[R]
---会创建特效.

---@param abilityId integer
---@param t effecttype
---@param where location
---@return effect
cj.AddSpellEffectByIdLoc = function(abilityId, t, where)end


---@param modelName string
---@param t effecttype
---@param targetWidget widget
---@param attachPoint string
---@return effect
cj.AddSpellEffectTarget = function(modelName, t, targetWidget, attachPoint)end

---新建闪电效果:${闪电效果}(${Boolean}检查可见性)起始点:(${X},${Y})终结点:(${X},${Y})
---新建闪电效果[R]
---会创建闪电效果.允许检查可见性则在起始点和终结点都不可见时将不创建闪电效果.

---@param codeName string
---@param checkVisibility boolean
---@param x1 real
---@param y1 real
---@param x2 real
---@param y2 real
---@return lightning
cj.AddLightning = function(codeName, checkVisibility, x1, y1, x2, y2)end

---新建闪电效果:${闪电效果}(${Boolean}检查可见性)起始点:(${X},${Y},${Z})终结点:(${X},${Y},${Z})
---新建闪电效果(指定Z轴)[R]
---会创建闪电效果.允许检查可见性则在起始点和终结点都不可见时将不创建闪电效果.

---@param codeName string
---@param checkVisibility boolean
---@param x1 real
---@param y1 real
---@param z1 real
---@param x2 real
---@param y2 real
---@param z2 real
---@return lightning
cj.AddLightningEx = function(codeName, checkVisibility, x1, y1, z1, x2, y2, z2)end


---@param whichBolt lightning
---@return real
cj.GetLightningColorA = function(whichBolt)end


---@param whichBolt lightning
---@param checkVisibility boolean
---@param x1 real
---@param y1 real
---@param x2 real
---@param y2 real
---@return boolean
cj.MoveLightning = function(whichBolt, checkVisibility, x1, y1, x2, y2)end

---移动${Lightning}到新位置,(${Boolean}检查可见性)新起始点:(${X},${Y},${Z})新终结点:(${X},${Y},${Z})
---移动闪电效果(指定坐标)[R]
---可指定Z坐标.允许检查可见性则在指定起始点和终结点都不可见时将不移动闪电效果.

---@param whichBolt lightning
---@param checkVisibility boolean
---@param x1 real
---@param y1 real
---@param z1 real
---@param x2 real
---@param y2 real
---@param z2 real
---@return boolean
cj.MoveLightningEx = function(whichBolt, checkVisibility, x1, y1, z1, x2, y2, z2)end


---@param abilityId integer
---@param t effecttype
---@param index integer
---@return string
cj.GetAbilityEffectById = function(abilityId, t, index)end


---@param abilityString string
---@param t soundtype
---@return string
cj.GetAbilitySound = function(abilityString, t)end

---坐标(${X},${Y})处的地形悬崖高度
---地形悬崖高度(指定坐标)[R]
---悬崖高度:深水区为0,浅水区为1,平原为2,之后每层+1.

---@param x real
---@param y real
---@return integer
cj.GetTerrainCliffLevel = function(x, y)end

---设置水颜色为:(${Red},${Green},${Blue}),透明值为:${Transparency}
---设置水颜色[R]
---颜色格式为(红,绿,蓝).透明值0为不可见.颜色值和透明道值取值范围为0-255.

---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetWaterBaseColor = function(red, green, blue, alpha)end

---改变(${X},${Y})处的地形为${TerrainType},使用样式:${Variation}范围:${Area}形状:${Shape}
---改变地形类型(指定坐标)[R]
---地形样式-1表示随机样式.范围即地形编辑器中的刷子大小.1表示128x128范围

---@param x real
---@param y real
---@param terrainType integer
---@param variation integer
---@param area integer
---@param shape integer
---@return nothing
cj.SetTerrainType = function(x, y, terrainType, variation, area, shape)end

---设置(${X},${Y})处单元点的${Pathing}地形通行状态为:${On/Off}
---设置地形通行状态(指定坐标)[R]
---例:设置'建造'通行状态为开,则该点可以建造建筑.一个单元点范围为32x32.

---@param x real
---@param y real
---@param t pathingtype
---@param flag boolean
---@return nothing
cj.SetTerrainPathable = function(x, y, t, flag)end

---删除${图像}
---删除

---@param whichImage image
---@return nothing
cj.DestroyImage = function(whichImage)end

---设置${Image}${Show/Hide}
---显示/隐藏[R]

---@param whichImage image
---@param flag boolean
---@return nothing
cj.ShowImage = function(whichImage, flag)end

---设置${Image}${Enable/Disable}Z轴显示,并设置高度为${Height}
---设置图像高度
---实际显示高度为图像高度+Z轴偏移.只有允许Z轴显示时才有效.

---@param whichImage image
---@param flag boolean
---@param height real
---@return nothing
cj.SetImageConstantHeight = function(whichImage, flag, height)end

---设置${Image}的颜色值为(${Red},${Green},${Blue})Alpha值为${Alpha}
---改变图像颜色[R]
---颜色格式为(红,绿,蓝).Alpha值为0是不可见的.颜色值和Alpha值取值范围0-255.

---@param whichImage image
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return nothing
cj.SetImageColor = function(whichImage, red, green, blue, alpha)end


---@param whichPlayer player
---@param whichLocation location
---@param radius real
---@param addBlight boolean
---@return nothing
cj.SetBlightLoc = function(whichPlayer, whichLocation, radius, addBlight)end

---设置${Image}:${Enable/Disable}永久显示状态
---设置图像永久渲染状态
---要显示图像则必须开启该项.

---@param whichImage image
---@param flag boolean
---@return nothing
cj.SetImageRenderAlways = function(whichImage, flag)end

---设置${Image}:${Enable/Disable}水面显示,${Enable/Disable}水的Alpha通道
---图像水面显示状态
---前者设置图像在水面或是水底显示.后者设置图像是否受水的Alpha通道影响.

---@param whichImage image
---@param flag boolean
---@param useWaterAlpha boolean
---@return nothing
cj.SetImageAboveWater = function(whichImage, flag, useWaterAlpha)end

---新建的地面纹理变化在点(${X},${Y}),使用图像:${Type}颜色值为(${Red},${Green},${Blue})Alpha值为${Transparency}(${Enable/Disable}暂停状态,${Enble/Disable}跳过出生动画)
---新建地面纹理变化[R]
---颜色值和Alpha值取值范围0-255.使用'地面纹理变化-设置永久渲染状态'来显示创建的纹理变化.暂停状态表示动画播放完毕后是否继续保留该纹理变化.会创建纹理变化.

---@param x real
---@param y real
---@param name string
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@param forcePaused boolean
---@param noBirthTime boolean
---@return ubersplat
cj.CreateUbersplat = function(x, y, name, red, green, blue, alpha, forcePaused, noBirthTime)end

---结束${Ubersplat}
---结束地面纹理变化
---在动画播放完毕时自动清除该地面纹理变化.

---@param whichSplat ubersplat
---@return nothing
cj.FinishUbersplat = function(whichSplat)end

---设置${Ubersplat}状态为${Show/Hide}
---显示/隐藏地面纹理变化[R]

---@param whichSplat ubersplat
---@param flag boolean
---@return nothing
cj.ShowUbersplat = function(whichSplat, flag)end

---设置${Ubersplat}:${Enable/Disable}渲染状态
---设置渲染状态
---未发现有任何作用.

---@param whichSplat ubersplat
---@param flag boolean
---@return nothing
cj.SetUbersplatRender = function(whichSplat, flag)end

---为${Player}在${Region}${Create/Remove}一块荒芜地表
---创建/删除荒芜地表(矩形区域)[R]

---@param whichPlayer player
---@param r rect
---@param addBlight boolean
---@return nothing
cj.SetBlightRect = function(whichPlayer, r, addBlight)end

---新建${玩家}的不死族金矿在(${X},${Y}),面向角度:${Face}度
---新建不死族金矿[R]

---@param id player
---@param x real
---@param y real
---@param face real
---@return unit
cj.CreateBlightedGoldmine = function(id, x, y, face)end

---坐标点(${X},${Y})被荒芜地表覆盖
---坐标点被荒芜地表覆盖[R]

---@param x real
---@param y real
---@return boolean
cj.IsPointBlighted = function(x, y)end

---播放${Rect}内所有${装饰物类型}的${AnimationName}动作(${允许/禁止}随机播放)
---播放矩形区域内地形装饰物动画[R]
---特殊动画名:'show','hide','soundon','soundoff'.随机播放:比如某装饰物有好几个'stand'动作,则允许该项时会随机抽取某个动作播放,而禁止该项时只播放首个动作.

---@param r rect
---@param doodadID integer
---@param animName string
---@param animRandom boolean
---@return nothing
cj.SetDoodadAnimationRect = function(r, doodadID, animName, animRandom)end

---为${Player}启用对战AI:${Script}
---启用对战AI
---AI只能对电脑玩家使用,当运行该动作后,与之配匹的电脑玩家会强制执行该AI脚本.

---@param num player
---@param script string
---@return nothing
cj.StartMeleeAI = function(num, script)end

---为${Player}启用战役AI:${Script}
---启用战役AI
---AI只能对电脑玩家使用,当运行该动作后,与之配匹的电脑玩家会强制执行该AI脚本.

---@param num player
---@param script string
---@return nothing
cj.StartCampaignAI = function(num, script)end

---对${Player}发送AI命令:(${命令},${数据})
---发送AI命令
---发送的AI命令将被AI脚本所使用.

---@param num player
---@param command integer
---@param data integer
---@return nothing
cj.CommandAI = function(num, command, data)end

---${Player}的对战AI难度
---玩家的AI难度
---对非AI玩家返回普通难度.

---@param num player
---@return aidifficulty
cj.GetAIDifficulty = function(num)end

---忽视${Player}的所有单位的警戒点
---忽视所有单位的警戒点
---单位将不会自动返回原警戒点.一个很有用的功能就是刷怪进攻时忽视单位警戒范围的话,怪就不会想家了.

---@param num player
---@return nothing
cj.RemoveAllGuardPositions = function(num)end

---运行:${函数名}
---运行函数[R]
---使用该功能运行的函数与触发独立,只能运行自定义无参数函数.

---@param funcName string
---@return nothing
cj.ExecuteFunc = function(funcName)end

---输入作弊码:${String}
---输入作弊码[R]
---作弊码只在单机有效.

---@param cheatStr string
---@return nothing
cj.Cheat = function(cheatStr)end

---预载${文件}
---预载文件
---可以事先载入文件并调入到游戏内存,以加快游戏的速度.

---@param filename string
---@return nothing
cj.Preload = function(filename)end

---开始预载,超时设置${Time}秒
---开始预载
---将文件调入到游戏内存中.

---@param timeout real
---@return nothing
cj.PreloadEnd = function(timeout)end


---@param undefined nothing
---@return nothing
cj.PreloadStart = function(undefined)end


---@param undefined nothing
---@return nothing
cj.PreloadRefresh = function(undefined)end


---@param filename string
---@return nothing
cj.PreloadGenEnd = function(filename)end

---预载所有在${文件}中列出的文件
---批量预载

---@param filename string
---@return nothing
cj.Preloader = function(filename)end
